Pythonでディクショナリを使用するサンプルです。
# -*- coding: Shift_JIS -* dictionary = {'ONE':'1', 'TWO':'2', 'THREEE':'3'} print('ディクショナリの中身を表示') print(dictionary) print('\n') print('for文で1つずつ表示') for i in dictionary: print(i) print(dictionary[i]) print('\n') print('要素の追加') dictionary['FOUR'] = '4' dictionary['FIVE'] = '5' print(dictionary) print('\n') print('要素の削除') del dictionary['FOUR'] print('\n') print('KEY、VALUEのみ表示') print(dictionary.keys()) print(dictionary.values()) print('\n') print('KEY、VALUEの取得') for key, value in dictionary.items(): print(key, value) print('\n') print('KEYの存在確認') print('FOUR' in dictionary) print('FIVE' in dictionary)