Resolved: What does the second argument of the .get method stand for?
It stands for the value if the key is not found.
1 answers ( 0 marked as helpful)
Hi Daniel,
It appears you have answered the question posed. For further considerations I can only cite the official Python 3 documentation,
available at https://docs.python.org/3/library/stdtypes.html?highlight=dict%20get#dict.get --
--------------------------
get
(key[, default])
Return the value for key if key is in the dictionary, else default. If default is not given, it defaults to None
, so that this method never raises a KeyError
.
--------------------------
Best,
A., The 365 Team