+ 1
How to represent digits of numbers in form of elements of list in python?
4 Respostas
+ 6
It would be great, if i could make us a sample how the list should look like, and what you expect as output. Thanks!
+ 5
digits = [digit for digit in str(number)]
+ 4
>>> n=127266373
>>> [int(d) for d in str(n)]
[1, 2, 7, 2, 6, 6, 3, 7, 3]
>>>
+ 2
Thanks everyone I got it...