# What is a list type []?

``````a=[1,2,3]
b=["a","b","c"]
``````

Something like that.

1. Can handle a lot of data at once
2. Various operations such as adding / deleting elements and searching are possible.

``````a=[1,2,3]
#.append()
a.ppend(4)
print(a)
``````

#### `Execution result`

``````
[1,2,3,4]
``````

Add elements using append like this

# Delete the element

``````a=[1,2,3,4]
#.remove()
a.remove(4)
print(a)
``````

#### `Execution result`

``````
[1,2,3]
``````

Use remove like this to remove an element

# Search for elements

``````a=[1,2,3]
print(a)
print(a)
print(a)
``````

#### `Execution result`

``````
1
2
3
``````

The elements of the list are 0,1,2, ... from the left What happens from the right?

``````a=[1,2,3]
print([-1])
print([-2])
print([-3])
``````

#### `Execution result`

``````
3
2
1
``````

The elements of the list are -1, -2, -3, ... from the right.

# Search for multiple elements

``````a=[1,2,3,4,5,6]
#1~Extract 3 elements
print(a[0:3])
#2~Extract 6 elements
print(a[1:])
#1~Take out every two elements of 6
print([::2])
``````

#### `Execution result`

``````
[1,2,3]
[2,3,4,5,6]
[1,3,5]
``````

``````#There is a list in the list
a=[[1,2],[3,4],[5,6]]
print(a)
print(a)
``````

#### `text:Execution result:`

``````
#In the list of a[1,2]Taken out
[1,2]
#In the list of a[1,2]I took out the first one from the left of
1
``````