SHARE
TWEET

Untitled

a guest Jul 17th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def calc7(org_list):
  2.    
  3.     ret_list = org_list
  4.     ret_num = -1
  5.     lucnum = tmp = 0
  6.     lucky = False
  7.  
  8.     if len(org_list) == 0:
  9.         return ret_num
  10.  
  11.     for i in range(len(org_list)):
  12.  
  13.         tmp = ret_list.pop()
  14.         ret_num = ret_num  + tmp
  15.  
  16.     return ret_num
  17.  
  18. print(calc7([1,2]))
  19. print(calc7([3,7]))
  20. print(calc7([7,5,6]))
  21. print(calc7([7,9,7,9,7,9]))
  22. print(calc7([]))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top