Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

itertools

>>> head, middle, tail = numbers[0], numbers[1:-1], numbers[-1]
>>> head, *middle, tail = numbers
Source by treyhunner.com #
 
PREVIOUS NEXT
Tagged: #itertools
ADD COMMENT
Topic
Name
1+4 =