diff --git a/python_basics/list/README.md b/python_basics/list/README.md index e7a1268..2ff323e 100644 --- a/python_basics/list/README.md +++ b/python_basics/list/README.md @@ -226,5 +226,25 @@ print(collection_of_strings) # -> ['AA', 'CC', 'DD'] |list.reverse()|​ |list.copy()​| +## [Common Sequence Operations](https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range​) + + +|Operation​|Result​| +|---|---| +|x in s​|True if an item of s is equal to x, else False​| +|x not in s​|False if an item of s is equal to x, else True​| +|s + t​|the concatenation of s and t​| +|s * n or n * s​|equivalent to adding s to itself n times​| +|s[i]|​ith item of s, origin 0​| +|s[i:j]|​slice of s from i to j​| +|s[i:j:k]|​slice of s from i to j with step k​| +|len(s)​|length of s​| +|min(s)​|smallest item of s​| +|max(s)​|largest item of s​| +|s.index(x[, i[, j]])​|index of the first occurrence of x in s (at or after index i and before index j)​| +|s.count(x)​|total number of occurrences of x in s​| + + +