Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- numbers = list(map(int, input().split(', ')))
- print(f'Positive: {[x for x in numbers if x >= 0]}')
- print(f'Negative: {[x for x in numbers if x < 0]}')
- print(f'Even: {[x for x in numbers if x % 2 == 0]}')
- print(f'Odd: {[x for x in numbers if x % 2 == 1]}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement