Guest User

Untitled

a guest
Jan 23rd, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.11 KB | None | 0 0
  1. # Partition a list into N groups
  2. lst = [1,2,3,4]
  3. print zip(*[iter(lst)]*2)
  4.  
  5. """
  6. Output:
  7. [(1, 2), (3, 4)]
  8. """
Add Comment
Please, Sign In to add comment