SyntaxError: invalid syntax

In the app project, 3/14, I tried to delete the row with the wrong rating

del android[10472]

but got a linter error:

File “”, line 33
del android[10472]
^
SyntaxError: invalid syntax

Not sure why is this happening, it’s solution from notebook.

Can you please attach your notebook?

Do you mean my own code?
note sure how. I hope that this link works:
https://app.dataquest.io/jupyter/notebooks/notebook/Basics-Copy1.ipynb

Nope, that doesn’t work. You need to download the notebook. Nevermind, though, I went and got it.

Your code ends with the following:

print(android[10472])
print(len(android[10472])

del android[10472]

You’re hitting that error because you didn’t close the parentheses in the line above the last one.

1 Like

Thanks. I always get confused when error is pointing to smth else than the wrong line.

1 Like