To verify whether a variable is among the keys of a dictionary there is...
To verify whether a variable is among the keys of a dictionary there is actually no need to call the keys() function. A dictionary has a __contains__() member which is called when the “in” keyword is used.
Please register or sign in to comment