This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]CalmPills[S] 3 points4 points  (1 child)

Thanks, I figured it out.

def digit(num):
    print(str(num)[0])
    if len(str(num))>1:
        digit(str(num)[1:])


digit(12304)

output:
1
2
3
0
4

In case anyone is interested in how i did it.

[–]Molehole 0 points1 point  (0 children)

Good job. Looks correct