Hey guys I'm trying to make a program that counts the evens in a two-dimensional list. The program I made so far is not returning what I want it to.
def Evens(x):
count = 0
x = len(x)
for a in range(x):
if a%2 == 0:
count = count + 1
return count
that keeps returning 2 for the list Evens([[1,3],[1,9,7,1,3],[13]])
when I want it to return 4. I tried everything but it seems to not be working correctly.
Thanks