Created
October 1, 2018 17:57
-
-
Save ardenn/6e74b9c3cd28c04e9fdc16761e9feda4 to your computer and use it in GitHub Desktop.
Python Dictionaries Tutorial - Modifying items
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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