#follow me on Grepper
#all() is a function to return True if all of the items is True, if not all True, then it will return False.
myList=[True, True, True, True]
print(all(myList))
myList2=[True, True, True, False]
print(all(myList2))
myList=[True, True, True, True]
print(all(myList)) # True
myList2=[True, True, True, False]
print(all(myList2)) # False
boolean_list = ['True', 'True', 'True']
# check if all elements are true
result = all(boolean_list)
print(result)
# Output: True
#all() func in python is using to return true if all items is true and false if one item is False.
myList=[True, True, True]
print(myList)
myList2=[True, False, True]
print(myList)
mydict = {1: "sam", 1 : "john", 1: "loki"}
x = all(mydict)
print(x)
#output: True (because all() checks for keys not the value)
mydict1 = {}
y = all(mydict1)
print(y)
#output: True (even if iterable is empty)