book = {"title": "Dune", "pages": 412} book["pages"] = 688 # update existing key book["author"] = "Herbert" # add a new key print(book)
Click Run to execute this code.