Sunday, October 28, 2018

Short way to write or in python

I have this code:



table is a list.




if 'ping' in table or 'pong' in table:
# Do something here


Is there a shorter way to write this?
I don't want to have table duplicated in the if statement.

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...