0):
+ operator to concatenate two lists. Example:
Members
append
Parameters
clear
extend
Parameters
index
Parameters
insert
Parameters
pop
index is specified, it removes and returns the last item in the list.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
The new site is online! Please use this issue to report any problems.
x = [1, 2, 3]
0):
e = x[1] # e == 2
+ operator to concatenate two lists. Example:
x = [1, 2] + [3, 4] # x == [1, 2, 3, 4]
x = ["a", "b"]
x += ["c"] # x == ["a", "b", "c"]
['a', 'b', 'c', 'd'][1:3] # ['b', 'c']
['a', 'b', 'c', 'd'][::2] # ['a', 'c']
['a', 'b', 'c', 'd'][3:0:-1] # ['d', 'c', 'b']
None list.append(item)
| Parameter | Description |
|---|---|
item | required |
None list.clear()
None list.extend(items)
| Parameter | Description |
|---|---|
items | required |
int list.index(x, start=None, end=None)
None list.insert(index, item)
| Parameter | Description |
|---|---|
index | int; required The index of the given position. |
item | required The item. |
unknown list.pop(i=-1)
index is specified, it removes and returns the last item in the list.
| Parameter | Description |
|---|---|
i | int; or None; default is -1 The index of the item. |
None list.remove(x)
| Parameter | Description |
|---|---|
x | required The object to remove. |