Update README.md
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
parent
1e496164b8
commit
2ee5059874
1 changed files with 20 additions and 0 deletions
|
@ -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|
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue