Return a dict with counts of even and odd numbers. Example: [1,2,3,4] => {'even':2, 'odd':2}
Implement this function:
def count_even_odd(lst: list) -> dict:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: lst.
Input
[1, 2, 3, 4]
Output
{'even': 2, 'odd': 2}