Home > database >  Why am I getting this error message? Python
Why am I getting this error message? Python

Time:01-30

I am new to Programming. Just learning about Python ..currently learning about List, Loops & Append

groceries = ["apple", "watermelon", "cucumber", "banana"]
print(groceries)
movies = ["Batman", "Superman", "Three Musketeers", "Interstellar"]
print(movies)
movies.APPEND("spiderman")....line 115
print(movies)

I get error message "AttributeError: 'list' object has no attribute 'APPEND' on line 115" when I try the append method

CodePudding user response:

Change "APPEND" to "append".

CodePudding user response:

Python methods are case-sensitive. When you want to append something to your list, it should always say "append".

  •  Tags:  
  • Related