- 1
how can I transform an int (like: 46) into a list of his numerals? (like: [4, 6])
I am creating an simple test to identify even or odd numbers, and this is crucial. any help is welcome :)
4 ответов
+ 3
list(str(intNum))
+ 1
@J.G. ... and then : [int(i) for i in list]
+ 1
thanks!
0
print(list(str(46)))