Tuple Packing & Unpacking

Tuple Packing & Unpacking

Python Multiple Assignments to variable/s

We all know that, we can assign values to multiple variables in a single line in Python programming like below

image.png

To comprehend how this works, you must first learn well about tuple data type. To create a tuple, we use a comma and it is the tuple constructor syntax.

image.png

A tuple is created on the right is tuple packing. A tuple is the target on the left is tuple unpacking.

#Python #Programming #python #datatypes #tuple

#packing #unpacking