Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python destructuring

head, *tail = [1, 2, 3, 4, 5]

print(head)  # 1
print(tail)  # [2, 3, 4, 5]
 
PREVIOUS NEXT
Tagged: #python #destructuring
ADD COMMENT
Topic
Name
1+7 =