Update README.md

Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
David Rotermund 2023-12-11 12:53:34 +01:00 committed by GitHub
parent bf37d9cf52
commit 1e496164b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -194,7 +194,7 @@ print(collection_of_strings.index("CC")) # -> 2
print(collection_of_strings.index("XX")) # -> ValueError: 'XX' is not in list
```
## [del](https://docs.python.org/3/tutorial/datastructures.html#the-del-statement) and [insert](https://docs.python.org/3/tutorial/datastructures.html#more-on-lists)
## [del](https://docs.python.org/3/tutorial/datastructures.html#the-del-statement) and [insert()](https://docs.python.org/3/tutorial/datastructures.html#more-on-lists)
```python
collection_of_strings = []
@ -209,3 +209,22 @@ print(collection_of_strings) # -> ['AA', 'BB', 'CC', 'DD']
del collection_of_strings[1]
print(collection_of_strings) # -> ['AA', 'CC', 'DD']
```
## [Additional commands](https://docs.python.org/3/tutorial/datastructures.html)
||
|---|
|list.append(x)|
|list.extend(iterable)|
|list.insert(i, x)|
|list.remove(x)|
|list.pop([i])|
|list.clear()|
|list.index(x[, start[, end]])|
|list.count(x)|
|list.sort(*, key=None, reverse=False)|
|list.reverse()|
|list.copy()|