Skip to content

Instantly share code, notes, and snippets.

Created Jul 10, 2020
What would you like to do?
#accessing using index
print (d['name']) #Output: karthi
# If key doesn't exists in the dictionary means and if we use index, then it will raise KeyError
print (d['rollno']) # Output: KeyError: 'rollno'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment