diff --git a/README.md b/README.md index ef227d3..5b94f57 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,8 @@ list_of_chars = list() ``` ```python -index = .index() # Returns first index of item or raises ValueError. + = in # For dictionary it checks if key exists. +index = .index() # Returns index of first occurrence or raises ValueError. .insert(index, ) # Inserts item at index and moves the rest to the right. = .pop([index]) # Removes and returns item at index or from the end. .remove() # Removes first occurrence of item or raises ValueError. diff --git a/index.html b/index.html index 5ba62ac..6ca1328 100644 --- a/index.html +++ b/index.html @@ -237,7 +237,8 @@ flatter_list = list(itertools.chain.from_iterable(<list>)) product_of_elems = functools.reduce(lambda out, x: out * x, <collection>) list_of_chars = list(<str>) -
index = <list>.index(<el>)     # Returns first index of item or raises ValueError.
+
<bool> = <el> in <collection>  # For dictionary it checks if key exists.
+index = <list>.index(<el>)     # Returns index of first occurrence or raises ValueError.
 <list>.insert(index, <el>)     # Inserts item at index and moves the rest to the right.
 <el> = <list>.pop([index])     # Removes and returns item at index or from the end.
 <list>.remove(<el>)            # Removes first occurrence of item or raises ValueError.