1. Checking All Element The Same in A List
def all_equal(lst):
"""
It returns True if all the elements in the list are equal, and False otherwise:param lst: The list to check
:return: True or False
"""
return lst[1:] == lst[:-1]
all_equal([1, 2, 3, 4, 5, 6]) # False
all_equal([1, 1, 1, 1]) # True