SyntaxFix
Write A Post
Hire A Developer
Questions
What about this?
my_string = "123,456.908" commas_removed = my_string.replace(',', '') # remove comma separation my_float = float(commas_removed) # turn from string to float.
In short:
my_float = float(my_string.replace(',', ''))