``````

In [1]:

l = list(range(3))
print(l)

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

[0, 1, 2]

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

In [2]:

l.append(100)
print(l)

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

[0, 1, 2, 100]

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

In [3]:

l.append('new')
print(l)

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

[0, 1, 2, 100, 'new']

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

In [4]:

l.append([3, 4, 5])
print(l)

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

[0, 1, 2, 100, 'new', [3, 4, 5]]

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

In [5]:

l = list(range(3))
print(l)

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

[0, 1, 2]

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

In [6]:

l.extend([100, 101, 102])
print(l)

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

[0, 1, 2, 100, 101, 102]

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

In [7]:

l.extend((-1, -2, -3))
print(l)

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

[0, 1, 2, 100, 101, 102, -1, -2, -3]

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

In [8]:

l.extend('new')
print(l)

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

[0, 1, 2, 100, 101, 102, -1, -2, -3, 'n', 'e', 'w']

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

In [9]:

l2 = l + [5, 6, 7]
print(l2)

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

[0, 1, 2, 100, 101, 102, -1, -2, -3, 'n', 'e', 'w', 5, 6, 7]

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

In [10]:

l += [5, 6, 7]
print(l)

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

[0, 1, 2, 100, 101, 102, -1, -2, -3, 'n', 'e', 'w', 5, 6, 7]

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

In [11]:

l = list(range(3))
print(l)

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

[0, 1, 2]

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

In [12]:

l.insert(0, 100)
print(l)

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

[100, 0, 1, 2]

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

In [13]:

l.insert(-1, 200)
print(l)

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

[100, 0, 1, 200, 2]

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

In [14]:

l.insert(0, [-1, -2, -3])
print(l)

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

[[-1, -2, -3], 100, 0, 1, 200, 2]

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

In [15]:

l = list(range(3))
print(l)

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

[0, 1, 2]

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

In [16]:

l[1:1] = [100, 200, 300]
print(l)

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

[0, 100, 200, 300, 1, 2]

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

In [17]:

l = list(range(3))
print(l)

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

[0, 1, 2]

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

In [18]:

l[1:2] = [100, 200, 300]
print(l)

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

[0, 100, 200, 300, 2]

``````