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