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