SHARE
TWEET

Untitled

a guest Jan 21st, 2020 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. get = input().split(', ')
  2. count = int(input())
  3.  
  4. all = [[] for x in range(count)]
  5.  
  6. try:
  7.     while get:
  8.         for x in range(count):
  9.             elem = get[x]
  10.             all[x].append(int(elem))
  11.         for x in range(count):
  12.             get.pop(0)
  13.  
  14.     print([sum(x) for x in all])
  15.  
  16. except IndexError:
  17.     print([sum(x) for x in all])
  18.     quit()
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