tomleo

Unpacking Py3 3

Mar 9th, 2013
502
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. >>> l
  2. [0, 1, 2, 3, 4]
  3. >>> first, *middle, last = l
  4. >>> first
  5. 0
  6. >>> middle
  7. [1, 2, 3]
  8. >>> last
  9. 4
  10. >>> l = [1,2]
  11. >>> first, *middle, last = l
  12. >>> first
  13. 1
  14. >>> middle
  15. []
  16. >>> last
  17. 2
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×