Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions python_dictioneries_pt2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# in this today we cover change items in dictioneries in python

thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}

thisdict["year"] = 2020
print(thisdict)

# as we see in terminal that it changes the value of key on print
#{'brand': 'Ford', 'model': 'Mustang', 'year': 2020} like this.
# even there are in list is different and we change it it is gonna be different

thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
thisdict.update({"year": 2020})
print(thisdict)

# here we use it like update
# but asa we see that there is no red lights under list

# so this is that for changing