Of course it does. On line 9 (and the others really), your condition is wrong. You need to write
Non-empty strings evaluate to
month == "September" or month == "October" or month == "November"
. Non-empty strings evaluate to
True
, so if month
isn't "September"
, the string "October"
is tested and since that evaluates to True
(the term used is "truthy") line 10 is executed. See the docs for more info.