殴り書きのメモ状態です...
dict = {'x': 10, 'y': 20}
dict = {'x': 10, 'y': 20} dict.keys() // dict_keys(['x', 'y']) dict.values() // dict_values([10, 20])
dict = {'x': 10, 'y': 20} dict2 = {'x': 30, 'z': 100} // update()で同じKeyは上書き、違うものは挿入 dict.update(dict2) // {'x': 30, 'y': 20, 'z': 100} // get(key)でValueの取得 dict.get('x') // 30 // pop(key)で要素の削除 dict.pop('x') // 30, dict = {'y': 20, 'z': 100}
dict = {'x': 10, 'y': 20} 'y' in dict // True
List型のところに具体例があります。
dict = {'x': 10, 'y': 20} print(dict.items()) // dict_items([('x', 10), ('y', 20)])