I would appreciate some help or an explanation. The code currently returns 1. I would like the below code to return 3 simply counting the numbers divisible by 10 within my list. It seems the for loop only iterates once. How can I get this code to iterate again? Thank you. Code Below.
def divisible_by_ten(num):
counter = 0
for i in num:
if i % 10 == 0:
counter += 1
return counter
print(divisible_by_ten([20, 25, 30, 35, 40]))