values are included in lst.values is contained in lst using a for loop.False if any one value is not found, True otherwise.def includes_all(lst, values): for v in values: if v not in lst: return False return True
includes_all([1, 2, 3, 4], [1, 4]) # True includes_all([1, 2, 3, 4], [1, 5]) # False
Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️