how to cast to double in python code example Example: cast string to double python x = "2342.34" float(x) #2342.3400000000001