我试图从包含引发以下错误的浮点值的列表中获取值,
list = [0.98,0.97,0.95,0.96,0.99,0.99]
for a in list:
if list[a] >=0.98:
print("some output")
错误:
TypeError: list indices must be integers, not float
慕容3067478
相关分类