- 1
How to print the individual digits of given number
3 Respostas
- 1
```py
val_list = list(str(100))
val_list[0] #1
val_lis[1] #0
#...
```
+ 2
convert it to string, then convert that string to list or iterate over chars of string and print each chars (digits)
+ 1
x=4567
#convert to string:
y = str(x)
#print out every digit of number:
for i in y:
#as integer:
print(int(i))
#or as type str:
print(i)