From 8f504b21d2577aa6ab99267bb2fc9baffa8ab23f Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Mon, 11 Dec 2023 18:09:43 +0100 Subject: [PATCH] Update README.md Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> --- python_basics/list/README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/python_basics/list/README.md b/python_basics/list/README.md index 43bfe66..b32df3a 100644 --- a/python_basics/list/README.md +++ b/python_basics/list/README.md @@ -229,6 +229,28 @@ print("AA" not in collection_of_strings) # -> False print("XX" not in collection_of_strings) # -> True ``` +## + + +```python +collection_of_strings_a = [ + "AA", + "BB", + "CC", + "DD", +] +collection_of_strings_b = [ + "EE", + "FF", + "GG", + "HH", +] +print(collection_of_strings_a) # -> ['AA', 'BB', 'CC', 'DD'] +print(collection_of_strings_b) # -> ['EE', 'FF', 'GG', 'HH'] +collection_of_strings = collection_of_strings_a + collection_of_strings_b + +print(collection_of_strings) # -> ['AA', 'BB', 'CC', 'DD', 'EE', 'FF', 'GG', 'HH'] +``` + ## [Additional commands](https://docs.python.org/3/tutorial/datastructures.html) ||