※前提条件
以下のような辞書があるとする
d = {}
d["keyA"] = "valueA"
d["keyB"] = "valueB"
d["keyC"] = "valueC"
for k in d.keys():
print(k)
keyA keyB keyC
for v in d.keys():
print(v)
valueA valueB valueC
for i in d.items():
print(i)
(‘keyA’, ‘valueA’) (‘keyB’, ‘valueB’) (‘keyC’, ‘valueC’)