KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I often end up writing code like if x == 1 or x == 5 or x == 10 or x == 22 : pass In English it seems redundant to keep repeating x , is there an easier or shorter way to write out an if-statement like that? Maybe checking of existence of x 's value in a tuple ( 1, 5, 10, 22, ) or something?
Tags (comma-separated)
Save Edits
Cancel