Skip to content

Commit 27e1180

Browse files
committed
Update '자연수를 뒤집어 리스트로 만들기'
1 parent 43d1df3 commit 27e1180

File tree

1 file changed

+10
-0
lines changed
  • Level_1/자연수를 뒤집어 리스트로 만들기

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def digit_reverse(n):
2+
# 함수를 완성해 주세요
3+
result = []
4+
numlist = list(str(n))
5+
for i in range(-1,-len(numlist)-1, -1):
6+
result.append(int(numlist[i]))
7+
return result
8+
9+
# 아래는 테스트로 출력해 보기 위한 코드입니다.
10+
print("결과 : {}".format(digit_reverse(12345)))

0 commit comments

Comments
 (0)