I have a long, un-grouped list and I am trying to convert the decimal numbers from strings to floats. However, they exist in a list that has other strings and integers. Here is an example of what I am working with:
List1 = ['01/01/2020', 'AType', '4.30', '789.33', '02/01/2020', 'BType', '342.77', '84', '03/01/2020', 'CType', '2', '245.22', etc, etc, etc,]
I am aware of the way to convert strings into integers [int(f) if f.isdigit() else f for f in listone] but that does not seem to work with [float(x.strip(' "')) if x.isdecimal() else x for x in listone]. How do I convert the decimal strings into floats?