- 1
AttributeError: 'tuple' object has no attribute 'append'
age(23,43,25,53,22) age.append(100) print(age) I tried to run the above code on JetBeans but error occurred. AttributeError: 'tuple' object has no attribute 'append' please help.
4 Antworten
+ 1
Try this:
age=[23,43,25,53,22]
age.append(100)
print(age)
+ 1
Hey, Thanks a lot... It worked...
+ 1
:)
0
You need to use this [] instead of () when u make a list,that is the problem i ran to when using python,and that was the solution.try it.