Welcome to the Treehouse Community
Looking to learn something new?
SyntaxError: invalid syntax when adding the try/except
Code was running just fine till I added this code.
def remove_from_list(): show_list() what_to_remove = input("What would you like to remove?\n> " try: shopping_list.remove(what_to_remove) except ValueError: pass show_list()
Now when I first opened this file I found that I needed to remove alot of spaces and add tabs because I was getting alot of indentation errors, but the code was running correctly until I added the function. I have the indentation guides turned on to help with the issue I was having with the indentation errors, but I don't think I've gotten the syntax wrong here.
Have I gotten something wrong here...?