Advertisement
STANAANDREY

lsd4 hw3 c

Oct 22nd, 2022
848
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. def nrToList(nr):
  2.     if nr == 0:
  3.         return [0]
  4.  
  5.     if nr // 10 != 0:
  6.         return nrToList(nr // 10) + [nr % 10]
  7.     else:
  8.         return [nr]
  9.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement