Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nums = [int(x) for x in input().split(', ')]
- cra = {'Positive': lambda x: x >= 0, 'Negative': lambda x: x < 0, 'Even': lambda x: not x % 2, 'Odd': lambda x: x % 2}
- [print(f"{c}: {', '.join(str(n) for n in nums if cra[c](n))}") for c in cra.keys()]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement