Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> l
- [0, 1, 2, 3, 4]
- >>> first, *middle, last = l
- >>> first
- 0
- >>> middle
- [1, 2, 3]
- >>> last
- 4
- >>> l = [1,2]
- >>> first, *middle, last = l
- >>> first
- 1
- >>> middle
- []
- >>> last
- 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement