Advertisement
Blessing988

Untitled

Feb 29th, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. #This program declares a function that accepts two list of numbers and returns the difference between the values of the first and the second list
  2.  
  3. #function
  4.  
  5. def sum_difference(list1, list2):
  6.  
  7.  
  8.     print(sum(list1) - sum(list2))
  9.  
  10.  
  11. sum_difference([1, 2, 3], [1, 2, 4])
  12. sum_difference([1], [ ])                 #Example (the two arguments must consist of two lists)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement