if element in list is equal code example
Example 1: how to check if all values in list are equal python
res = all(ele == lst[0] for ele in lst)
if(res):
print("Equal")
Example 2: how to check if all values in list are equal python
if len(lst) < 0 :
res = True
res = lst.count(lst[0]) == len(lst)
if(res):
print("Equal")