Oct-03-2016, 04:45 PM
You're trying to use if/elif interactively. Which means you need to enter both before the next prompt (">>>").
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:01:18) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> if "spam" == "eggs": ... print("I doubt it.") ... elif "spam" in ["spam", "spam", "spam", "baked beans", "spam"]: ... print("More likely.") ... More likely. >>>