From 1e496164b8ae18943859a5b8764059b6dbe353fa Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Mon, 11 Dec 2023 12:53:34 +0100 Subject: [PATCH] Update README.md Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> --- python_basics/list/README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/python_basics/list/README.md b/python_basics/list/README.md index 2c998b4..e7a1268 100644 --- a/python_basics/list/README.md +++ b/python_basics/list/README.md @@ -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()​| + + +