I want to print the count of items based on the IF statement below. What I have below is printing the entire list, 7 times, and a count for each item (1). That is not what I want. Ideally it would return:
5
1
1
Any ideas?
from collections import Counter
li = (1,4,55,6,87,44,25)
for i in li:
if i < 50:
print(Counter(li))
elif i > 50 and i < 85:
print(Counter(li))
else:
print(Counter(li))