0
Python AttributeError: 'tuple' object has no attribute 'append'
last_semester_gradebook = [["politics", 80], ["latin", 96], ["dance", 97], ["architecture", 65]] # Your code below: subjects = ["physics", "calculus", "poetry", "history"] gardes = [98, 97, 85, 88] gradebook = [["physics", 98], ["calculus", 97], ["poetry", 85]], ["history", 88] print(gradebook) gradebook.append(["computer science", 100])
2 ответов
+ 3
gradebook = [ ["physics", 98], ["calculus", 97], ["poetry", 85], ["history", 88]
]
Misplaced of ']' in the definition of <gradebook> list.
0
My guess is try using a list instead of a tuple. I think tuples don't have methods like that because they're immutable.