nums = {'evens': [], 'odds': []}
for number in numbers.split(' '):
    if int(number) % 2:
        nums['odds'].append(number)
else:
    nums['evens'].append(number)
Split string of digits into lists of even and odd integers