def solution(n):
answer = []
answer_list = []
answer_list = list(str(n))
answer_list = answer_list[::-1] # 역순으로 바꿈
for i in answer_list:
answer.append(int(i))
return answer
def solution(n):
return [int(x) for x in str(n)[::-1]]
'Coding Test > Programmers_Python' 카테고리의 다른 글
[프로그래머스/python] 나누어 떨어지는 숫자 배열 (0) | 2020.07.09 |
---|---|
[프로그래머스/python] 핸드폰 번호 가리기 (0) | 2020.07.09 |
[프로그래머스/python] 최대공약수와 최대공배수 (0) | 2020.07.08 |
[프로그래머스/python] 문자열 다루기 기본 (0) | 2020.07.08 |
[프로그래머스/python] 행렬의 덧셈 (0) | 2020.07.08 |