Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- numbers = [ -2, -1, 0, 1, 2 ]
- positive = []
- negative = []
- for num in numbers:
- if num > 0:
- positive.append( num )
- if num < 0:
- negative.append( num )
- print( 'positive', positive )
- print( 'negative', negative )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement