Last answered:

22 Mar 2021

Posted on:

29 Jan 2021

1

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)
Instructor
Posted on:

22 Mar 2021

1

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

Submit an answer