I have the following code:
l = [\'-1.2\', \'0.0\', \'1\'] x = 100.0 for i in l: if i < x: x = i print x
The code should fin
Cast the variable to a float before doing the comparison:
if float(i) < float(x):
The problem is that you are comparing strings to floats, which will not work.