From 356dc8136cab2fd6cb605059062069e689e5d937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Wed, 20 Mar 2019 03:52:52 +0100 Subject: [PATCH] List and set --- README.md | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 60b28db..46ecd60 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,8 @@ List ``` ```python -.append() -.extend() - += [] - += +.append() # Or: += [] +.extend() # Or: += ``` ```python @@ -45,11 +43,11 @@ list_of_chars = list() ``` ```python -index = .index() # Returns first index of item. -.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. -.clear() # Removes all items. +index = .index() # Returns first index of item. +.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. +.clear() # Removes all items. ``` @@ -98,10 +96,8 @@ Set ``` ```python -.add() -.update() - |= {} - |= +.add() # Or: |= {} +.update() # Or: |= ``` ```python