def solution(n):
answer = list()
answer_list = list(str(n))
for i in answer_list:
answer.append(int(i))
return sum(answer)
'Coding Test > Programmers_Python' 카테고리의 다른 글
[프로그래머스/python] 2016년 (0) | 2020.07.21 |
---|---|
[프로그래머스/python] 정수 내림차순으로 배치하기 (0) | 2020.07.16 |
[프로그래머스/python] 직사각형 별찍기 (0) | 2020.07.14 |
[프로그래머스/python] 직사각형 별찍기 (0) | 2020.07.14 |
[프로그래머스/python] 모의고사 (0) | 2020.07.14 |