I want to convert a float to a string, i mean, lets say 123.4567 to "1234567" ,then store it in a list like list=['1','2','3'..] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I want to convert a float to a string, i mean, lets say 123.4567 to "1234567" ,then store it in a list like list=['1','2','3'..]

convertion of float to string

12th Sep 2018, 5:17 PM
Joseph Ojo
Joseph Ojo - avatar
1 Answer
+ 13
x = str(123.4567).replace(".", "") lst = list(x)
12th Sep 2018, 5:22 PM
Eduardo Petry
Eduardo Petry - avatar