Answer the question
In order to leave comments, you need to log in
How to use all/any with if?
The essence of the question is in the title. For example, I need to compare a given element with each element of a given list, and if it is equal to at least one of the list, perform some action. You can use if x in ['fd', 'tf', 33] but is it possible to use any() somehow here?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question