Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def greater_sum(list1, list2):
- #the conditions below allows for the greater list to be outputed.
- if sum(list1) > sum(list2):
- return list1
- else:
- return list2
- print(greater_sum([1, 3, 5, 7, 9], [2, 4, 6, 8, 10]))
- print(greater_sum([2, 6, 10, 14, 18], [2, 4, 6, 8, 10]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement