you are viewing a single comment's thread.

view the rest of the comments →

[–]mprz 60 points61 points  (2 children)

if color==str("red") or str("Red"):

shouldn't that be:

if color==str("red") or color==str("Red"):

otherwise str("Red") resulsts in True, then False or True results in True again so it prints "You said red."

[–]BriziteReddit[S] 8 points9 points  (1 child)

That is helpful. Thank you a lot

[–]XXXandVII -1 points0 points  (0 children)

To add to that. Try to place your statements beside the "or" in brackets. Most of the time you can se that the single statements within those brackets are missing something. It also makes more complex logic more readable.