<s>[INST] How do I convert a string to a double in Python? I would like to know how to convert a string containing digits to a double.
 [/INST] >>> x = "2342.34"
>>> float(x)
2342.3400000000001

There you go.  Use float (which is almost always a C double).
 </s>