Get Dictionary Keys :

x = thisdict.keys()  # Returns view of all keys
print(x)

Output :

dict_keys(['brand', 'model', 'year'])

Dictionary Keys Reflect Changes :

car = {
  "brand": "Ford",
  "model": "Mustang",
  "year": 1964
}
x = car.keys()
print(x)  # Before change

car["color"] = "white"  # Adding new key
print(x)  # After change

Output :

dict_keys(['brand', 'model', 'year'])
dict_keys(['brand', 'model', 'year', 'color'])

Get Dictionary Values :

x = thisdict.values()
print(x)

Output :

dict_values(['Ford', 'Mustang', 1964])

Get Dictionary Items (key-value pairs) :

x = thisdict.items()
print(x)

Output :

dict_items([('brand', 'Ford'), ('model', 'Mustang'), ('year', 1964)])

Dictionary Items Reflect Changes :

car = {
  "brand": "Ford",
  "model": "Mustang",
  "year": 1964
}
x = car.items()
print(x)  # Before change

car["year"] = 2020
print(x)  # After change

Output :

dict_items([('brand', 'Ford'), ('model', 'Mustang'), ('year', 1964)])
dict_items([('brand', 'Ford'), ('model', 'Mustang'), ('year', 2020)])