0

please help how do i get python to read every other digit

if i have 2938736 how do i get it to read 9,8,3

5th Oct 2016, 5:42 PM
alex slater
alex slater - avatar
2 Respostas
+ 1
you can change the type of your number to str. and you can seperate every digit. num = 12345 num = str(num) for i in num: print(i, "," , end="") But i am not sure this is what you want. Hope it will be helpful.
5th Oct 2016, 6:36 PM
Koray
0
how would i be able to times the digits pulled by 2
5th Oct 2016, 6:40 PM
alex slater
alex slater - avatar