Python错误" TypeError:' float'对象不可订阅。"

时间:2017-10-02 08:30:54

标签: python-3.x

代码有什么错误?

for i in range (1:100):  
    if(abs(sigmaList[i] - sigmaList[i-1]) < t_error):
     sigmaList = sigmaList[1:i] 
     break      
# Print the list of computed sigmas.
print(sigmaList)

1 个答案:

答案 0 :(得分:0)

range (1:100) - SyntaxErrordocs)会出错。使用range(1,100)