``````

In [1]:

a = 100
b = 200

``````
``````

In [2]:

print(a)

``````
``````

100

``````
``````

In [3]:

print(b)

``````
``````

200

``````
``````

In [4]:

a, b = 100, 200

``````
``````

In [5]:

print(a)

``````
``````

100

``````
``````

In [6]:

print(b)

``````
``````

200

``````
``````

In [7]:

a, b, c = 0.1, 100, 'string'

``````
``````

In [8]:

print(a)

``````
``````

0.1

``````
``````

In [9]:

print(b)

``````
``````

100

``````
``````

In [10]:

print(c)

``````
``````

string

``````
``````

In [11]:

a = 100, 200

``````
``````

In [12]:

print(a)
print(type(a))

``````
``````

(100, 200)
<class 'tuple'>

``````
``````

In [13]:

# a, b = 100, 200, 300
# ValueError: too many values to unpack (expected 2)

``````
``````

In [14]:

# a, b, c = 100, 200
# ValueError: not enough values to unpack (expected 3, got 2)

``````
``````

In [15]:

a, *b = 100, 200, 300

``````
``````

In [16]:

print(a)
print(type(a))

``````
``````

100
<class 'int'>

``````
``````

In [17]:

print(b)
print(type(b))

``````
``````

[200, 300]
<class 'list'>

``````
``````

In [18]:

*a, b = 100, 200, 300

``````
``````

In [19]:

print(a)
print(type(a))

``````
``````

[100, 200]
<class 'list'>

``````
``````

In [20]:

print(b)
print(type(b))

``````
``````

300
<class 'int'>

``````
``````

In [21]:

a = b = 100

``````
``````

In [22]:

print(a)

``````
``````

100

``````
``````

In [23]:

print(b)

``````
``````

100

``````
``````

In [24]:

a = 200

``````
``````

In [25]:

print(a)

``````
``````

200

``````
``````

In [26]:

print(b)

``````
``````

100

``````
``````

In [27]:

a = b = c = 'string'

``````
``````

In [28]:

print(a)

``````
``````

string

``````
``````

In [29]:

print(b)

``````
``````

string

``````
``````

In [30]:

print(c)

``````
``````

string

``````
``````

In [31]:

a = b = [0, 1, 2]

``````
``````

In [32]:

print(a is b)

``````
``````

True

``````
``````

In [33]:

a[0] = 100
print(a)

``````
``````

[100, 1, 2]

``````
``````

In [34]:

print(b)

``````
``````

[100, 1, 2]

``````
``````

In [35]:

b = [0, 1, 2]
a = b

``````
``````

In [36]:

print(a is b)

``````
``````

True

``````
``````

In [37]:

a[0] = 100
print(a)

``````
``````

[100, 1, 2]

``````
``````

In [38]:

print(b)

``````
``````

[100, 1, 2]

``````
``````

In [39]:

a = [0, 1, 2]
b = [0, 1, 2]

``````
``````

In [40]:

print(a is b)

``````
``````

False

``````
``````

In [41]:

a[0] = 100
print(a)

``````
``````

[100, 1, 2]

``````
``````

In [42]:

print(b)

``````
``````

[0, 1, 2]

``````