How do I parse a string to a float or int? by Tarik >>> a = "545.2222" >>> float(a) 545.22220000000004 >>> int(float(a)) 545