Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. #A new program called sum_difference.
  2. #This program will return the difference between two list.
  3. def sum_difference(o, c):
  4. #the function have been defined.
  5.  
  6.    
  7.     if sum(o) > sum(c):
  8.         return sum(o) - sum(c)
  9.     else:
  10.         sum(c) - sum(o)
  11. #this determine the positive different between the two list o and c
  12. sum_difference([2, 3, 7, 9],[6, 0, 5, 6])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement