Skip to main content
Active reading [<https://en.wiktionary.org/wiki/google#Verb_2>].
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

It took me some time to figure out what exactly my_dict.pop("key", None) is doing. So I'll add this as an answer to save others Googlinggoogling time:

pop(key[, default])

If key is in the dictionary, remove it and return its value, else return default. If default is not given and key is not in the dictionary, a KeyError is raised.

Documentation

It took me some time to figure out what exactly my_dict.pop("key", None) is doing. So I'll add this as an answer to save others Googling time:

pop(key[, default])

If key is in the dictionary, remove it and return its value, else return default. If default is not given and key is not in the dictionary, a KeyError is raised.

Documentation

It took me some time to figure out what exactly my_dict.pop("key", None) is doing. So I'll add this as an answer to save others googling time:

pop(key[, default])

If key is in the dictionary, remove it and return its value, else return default. If default is not given and key is not in the dictionary, a KeyError is raised.

Documentation

Format quote contents.
Source Link

It took me some time to figure out what exactly my_dict.pop("key", None) is doing. So I'll add this as an answer to save others googlingGoogling time:

pop(key[, default])

pop(key[, default])

If keykey is in the dictionary, remove it and return its value, else return defaultdefault. If defaultdefault is not given and keykey is not in the dictionary, a KeyErrorKeyError is raised.

Documentation

It took me some time to figure out what exactly my_dict.pop("key", None) is doing. So I'll add this as an answer to save others googling time:

pop(key[, default])

If key is in the dictionary, remove it and return its value, else return default. If default is not given and key is not in the dictionary, a KeyError is raised

Documentation

It took me some time to figure out what exactly my_dict.pop("key", None) is doing. So I'll add this as an answer to save others Googling time:

pop(key[, default])

If key is in the dictionary, remove it and return its value, else return default. If default is not given and key is not in the dictionary, a KeyError is raised.

Documentation

Updated the documentation link to go directly to the method rather than dumping you at the top of the page.
Source Link

It took me some time to figure out what exactly my_dict.pop("key", None) is doing. So I'll add this as an answer to save others googling time:

pop(key[, default])

If key is in the dictionary, remove it and return its value, else return default. If default is not given and key is not in the dictionary, a KeyError is raised

DocumentationDocumentation

It took me some time to figure out what exactly my_dict.pop("key", None) is doing. So I'll add this as an answer to save others googling time:

pop(key[, default])

If key is in the dictionary, remove it and return its value, else return default. If default is not given and key is not in the dictionary, a KeyError is raised

Documentation

It took me some time to figure out what exactly my_dict.pop("key", None) is doing. So I'll add this as an answer to save others googling time:

pop(key[, default])

If key is in the dictionary, remove it and return its value, else return default. If default is not given and key is not in the dictionary, a KeyError is raised

Documentation

Source Link
Akavall
  • 86.8k
  • 58
  • 214
  • 261
Loading