Source Code:
(back to article)
string = "1.23" # Parse the string to a float float_value = float(string) print(float_value) # Output: 1.23 # Parse the string to an int int_value = int(float_value) print(int_value) # Output: 1
Result:
Report an issue