‘516.0‘ 比 1173 更大??? 都怪没有强转 数字字符串
>>> a = ['516.0', '502.0', '525.0', '531.0']
>>> b = ['1173', '526', '1209', '615']
>>> c = max(a[0], b[0])
>>> c
'516.0'
>>> d = max(float(a[0]), float(b[0]))
>>> d
1173.0
>>>
另外,你万万不可以将 int 和 str 进行比较
>>> a = ['516.0', '502.0', '525.0', '531.0']
>>> b2 = [1173, 526, 1209, 615]
>>> c2 = max(a[0], b2[0])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: '>' not supported between instances of 'int' and 'str'