Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def sum_negative(x):
- """Return the sum of negative values found in x."""
- sum = 0
- for number in x:
- if number < 0:
- sum += number
- return sum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement