I found, that there is related question, about how to find if at least one item exists in a list:
http://stackoverflow.com/questions/740287/python-check-if-one-of-the-following-items-is-in-a-list
But what is the best and pythonic way to find whether all items exists in a list?
Searching througth the docs I found this solution:
>>> l = ['a', 'b', 'c']
>>> set(['a', 'b']) <= set(l)
True
>>> set(['a', 'x']) <= set(l)
False
Other solution would be this:
>>> l = ['a', 'b', 'c']
>>> all(x in l for x in ['a', 'b'])
True
>>> all(x in l for x in ['a', 'x'])
False
But here you must do more typing.
Is there any other solutions?