list_in_function
unknown
plain_text
3 years ago
219 B
2
Indexable
def count(): even = 0 odd = 0 for i in list: if i%2==0: even+=1 else: odd+=1 return even, odd even, odd = count(list) list = [12, 34, 56, 77, 99, 102]
Editor is loading...
def count(): even = 0 odd = 0 for i in list: if i%2==0: even+=1 else: odd+=1 return even, odd even, odd = count(list) list = [12, 34, 56, 77, 99, 102]