Python: Converting from string to integer/float

myString = "545.2222"
float(myString) #545.2222
 
#or to round it of
int(float(myString)) #545
 
#or to keep us safe in case the myString should be checked for "funny" values
try:
    i = int(myString)
except ValueError:
    i = 0