Update README.md

Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
David Rotermund 2023-12-11 17:52:25 +01:00 committed by GitHub
parent 2ee5059874
commit 7d1de5f948
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -210,6 +210,25 @@ del collection_of_strings[1]
print(collection_of_strings) # -> ['AA', 'CC', 'DD']
```
## in
```python
collection_of_strings = [
"AA",
"BB",
"CC",
"DD",
"EE",
"FF",
"GG",
"HH",
]
print("AA" in collection_of_strings) # -> True
print("XX" in collection_of_strings) # -> False
print("AA" not in collection_of_strings) # -> False
print("XX" not in collection_of_strings) # -> True
```
## [Additional commands](https://docs.python.org/3/tutorial/datastructures.html)
||