Write a Python function to check all elements of a list are the same or not


Topic: Write a Python function to check all elements of a list are the same or not

Solution

def check_equal(a):
  return a[1:] == a[:-1]



List all Python Programs