Check all are even in the list
Problem to check all the list elements are even or not.
Example-1:
Input : n = [ 2, 4, 6, 8] Output : True
Example-2:
Input : n = [ 1, 4, 6] Output : False
Solution
n = [ 2, 4, 6, 8] a = all([x % 2 == 0 for x in n]) print(a)
Output
True