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