Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

packing a tuple

The statement t = 12345, 54321, 'hello!' is an example of tuple packing: 
the values 12345, 54321 and 'hello!' are packed together in a tuple. 
The reverse operation is also possible:

>>> x, y, z = t
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #packing #tuple
ADD COMMENT
Topic
Name
2+5 =