Advertisement
tomleo

Unpacking Py3 2

Mar 9th, 2013
2,923
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PyCon 0.17 KB | None | 0 0
  1. >>> people_in_line = ['bart', 'maggie', 'lisa', 'marge', 'homer']
  2. >>> *in_line, next_up = people_in_line
  3. >>> in_line
  4. ['bart', 'maggie', 'lisa', 'marge']
  5. >>> next_up
  6. 'homer'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement