Check out example codes for "python how to check if all elements in list are the same". It will help you in understanding the concepts better.

Code Example 1

List = ['Mon','Mon','Mon','Mon']
// Result from count matches with result from len()
result = List.count(List[0]) == len(List)
if (result):
   print("All the elements are Equal")
   print("Elements are not equal")

Learn ReactJs, React Native from