Oops, hopefully this with indent correctly: def all_in(string, substrings): for substring in substrings: if substring not in string: return False return True