Advertisement
simeonshopov

Negative vs Positive

May 27th, 2020
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. numbers = [int(x) for x in input().split()]
  2. negative = sum(filter(lambda x: x < 0, numbers))
  3. positive = sum(filter(lambda x: x>= 0, numbers))
  4.  
  5. print(negative)
  6. print(positive)
  7.  
  8. if abs(negative) > positive:
  9.     print('The negatives are stronger than the positives')
  10. else:
  11.     print('The positives are stronger than the negatives')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement