168k views
1 vote
Please help.

Why I'm I getting a syntax error.

Please help. Why I'm I getting a syntax error.-example-1

1 Answer

5 votes

In python, the word list is a keyword. It's not meant to be used for a variable. Try changing list to lst. There also might be other parts wrong with your code. If we could take a look at your whole function, we could determine if there is anything else wrong with your code.

User Imdzeeshan
by
4.5k points