fiftyfizzbuzzes
fiftyfizzbuzzes copied to clipboard
Fixed 'y' or 'yes' comparisons
While Python supports range comparisons like a < b < c
, it doesn't do anything special with the ==
operator, so in the comparison ask == ("y" or "yes")
, the or
evaluates first which results in ask == "y"
.
A simple fix is to use the in
operator with a tuple: ask in ("y", "yes")
. And hey, finally an occasion for me to test making a pull request on someone else's github :)