Skip to content

Instantly share code, notes, and snippets.

@ardenn
Created October 1, 2018 17:57
Show Gist options
  • Save ardenn/6e74b9c3cd28c04e9fdc16761e9feda4 to your computer and use it in GitHub Desktop.
Save ardenn/6e74b9c3cd28c04e9fdc16761e9feda4 to your computer and use it in GitHub Desktop.
Python Dictionaries Tutorial - Modifying items
# Adding a new entry for salary using the index
job2["salary"] = 10000
# Modifying the entry for job_type using the index
job2["job_type"] = "Part time"
# Modifying the salary entry using update
job2.update({"salary":20000})
# Adding the available entry using update
job2.update({"available":True})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment