Skip to main content
better phrasing
Source Link
DinoCoderSaurus
  • 28.6k
  • 2
  • 12
  • 31

This elif(a == True and r[0] == 3 and r[1] == 4 or 7): will always evaluate to True because 7 is "truthy". You probably Did you mean or r[1] == 7.? And once an or introduced, the expression will likely need parentheses. Same goes for the subsequent elif.

This elif(a == True and r[0] == 3 and r[1] == 4 or 7): will always evaluate to True because 7 is "truthy". You probably mean or r[1] == 7. And once an or introduced, the expression will likely need parentheses. Same goes for the subsequent elif.

This elif(a == True and r[0] == 3 and r[1] == 4 or 7): will always evaluate to True because 7 is "truthy". Did you mean or r[1] == 7? And once an or introduced, the expression will likely need parentheses. Same goes for the subsequent elif.

Source Link
DinoCoderSaurus
  • 28.6k
  • 2
  • 12
  • 31

This elif(a == True and r[0] == 3 and r[1] == 4 or 7): will always evaluate to True because 7 is "truthy". You probably mean or r[1] == 7. And once an or introduced, the expression will likely need parentheses. Same goes for the subsequent elif.