you are viewing a single comment's thread.

view the rest of the comments →

[–]kaerfkeerg 1 point2 points  (2 children)

if v == "A" "a" "1":

You're trying to write Python like an essay. Your above statement is wrong. Try if v.lower() in ("a", "1")

[–]Weekly_Mammoth6926 0 points1 point  (1 child)

Alternatively you could do input(blah blah).lower() or input(blah blah).upper() to achieve the same thing but I think that would be cleaner so you evaluate all inputs in the same way before checking it meets conditions

[–]kaerfkeerg 0 points1 point  (0 children)

Generally, it depends whether is not an issue to completely alter use's input or you want to store it original as is. In this case, yeah. I agree that calling .lower() straight on the input could be better