Advertisement
tomleo

Unpacking Py3 1

Mar 9th, 2013
3,089
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PyCon 0.07 KB | None | 0 0
  1. >>> l = [1,2,3,4,5]
  2. >>> car, *cdr = l
  3. >>> car
  4. 1
  5. >>> cdr
  6. [2, 3, 4, 5]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement