1def containsAny(str, set):
2 """ Check whether sequence str contains ANY of the items in set. """
3 return 1 in [c in str for c in set]
4
5def containsAll(str, set):
6 """ Check whether sequence str contains ALL of the items in set. """
7 return 0 not in [c in str for c in set]