初学python,出现错误,但是不知道如何修改
错误提示是
Traceback:
in
in openOrSenior
AttributeError: 'list' object attribute 'append' is read-only
def openOrSenior(data):
# Hmmm.. Where to start?
long=len(data)
result=[]
for i in range(long):
if (data[i][0]>=55) and (data[i][1]>7):
result.append=("Senior")
else:
result.append=("Open")
return result
result.append('Senior'), tanda sama tidak diperlukan
Terdapat tanda sama tambahan selepas keputusan. tambahkan