python change commas into dots
Python[Edit]
+
0
-
0
python change commas into dots
1 2 3 4 5 6string_number = '123,456' result = float(string_number.replace(',', '.')) # change commas into dots and parse to float print(result) # 123.456 print(type(result)) # <class 'float'>
[Edit]
+
0
-
0
python change commas into dots
1 2 3 4 5string_number = '123,456,789' result = string_number.replace(',', '.') print(result) # 123.456.789