From 5c1e92457c7b52d61725f663cbf76d1bf49f1c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sun, 6 Jan 2019 00:01:33 +0100 Subject: [PATCH] Dictionary --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e791c94..ed706cb 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,6 @@ Dictionary ``` ```python -del [key] # Remove an existing key. value = .get(key, default) # Returns default if key does not exist. value = .setdefault(key, default) # Same, but also adds default to dict. = collections.defaultdict() # Creates a dictionary with default value of type. @@ -69,6 +68,7 @@ value = .setdefault(key, default) # Same, but also adds default to di ``` ```python +del [key] .update() = dict() # Initiates a dict from list of key-value pairs. = dict(zip(keys, values)) # Initiates a dict from two lists.