Tag: dictionary
- Why you should never use the dict.get() method in python (28 Nov 2019)
There is an increasing trend towards using the dict.get() method in Python, it’s very widely used in many tutorials and examples too. Consider the below example for instance: >>> dd = {'a': 1} >>> dd.get('a') 1 This simple dictionary dd has only one key (‘a’) and its corresponding value is...