In this code fragment:, when I invoke the Python interpreter, I get the following error:
M:\MongoDB University\Lecture 1\bottle_framework_url_hand
File "hello_world.py", line 15
elif (restaurant == "abcde"):
SyntaxError: invalid syntax
if (restaurant == None or restaurant == ""):
restaurant="***No restaurant selected***"
elif (restaurant not in myrestaurants): # trying something extra...
restaurant = "**Invalid restaurant selected**"
As far as I can tell, my syntax is OK. (e.g. a colon after the elif
line and proper indentation. What am I missing?