Advertisement
Mofeoluwa

GreaterSum

Feb 29th, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. def greater_sum(list1,list2): #define a function called greater_sum with two arguments list1 and list2
  2.     if sum(list1) > sum(list2): #if sum of list1 is greater than sum of list2
  3.         print(list1)
  4.     else: #else
  5.         print(list2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement