Skip to content

Instantly share code, notes, and snippets.

Last active Jul 10, 2020
What would you like to do?
#get(accessing using get method)
print(d.get("name")) # Output: karthi
#If key doesn't exists in the dictionary means ,returns None
print (d.get('rollno')) # Output: None
#default is mentioned.
print (d.get('rollno',"Not Available"))#Output:Not Available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment