Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This function returns the difference between the sum of the first list
- # and the second list. It accepts two lists
- def sum_difference(first, second):
- return sum(first) - sum(second)
- print(sum_difference([1, 2, 3], [1, 2, 4]))
- print(sum_difference([4, 5], [2, 6, 3]))
- print(sum_difference([1], []))
- # -1
- # -2
- # 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement