How to convert strfield to float after using strip to remove whitespace
I am trying to convert strfield to a float so it can be used for multiplication, however that is not working. Below is the code:
def Rates (strfield, strrecord):
abc = strrecord[45:48].strip()
fdmAPI.logInfo(abc)
fdmAPI.logInfo("Log1")
#strip double quotes and convert to float
strfield = strfield.strip('"')
fdmAPI.logInfo(strfield)
Should we use strfield = float(strfield.strip('"')) or first strfield = strfield.strip('"') and then strfield = float(strfield)
Kindly, help