Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1.  
  2. # The program accepts two lists of numbers and returns the list with the
  3. # grater sum
  4.  
  5. # Creates the first list
  6. first = []
  7.  
  8. # Creates the second list
  9. second = []
  10.  
  11. # Function definiition
  12. def greater_sum(first, second):
  13.  
  14. # This loop evaluates both lists and returns the list with the greater list
  15.     if sum(first) > sum(second):
  16.         print(list(first))
  17.     else:
  18.         print(list(second))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement