Python: Basic: Count Even Odd

Write the function count_even_odd that takes an integer n and returns two values corresponding to number of even and odd digits in n.


count_even_odd(109) -> 2, 1
count_even_odd(123456) -> 3, 3

Test 1    

Test 2    

Test 3    

Test 4