#!/usr/bin/python3 #define dictionary dic = { 'alice':100, 'bob':200, 'shak':300, } #get value by key x = dic["bob"] #set value by key dic["alice"] = 400 #print all keys for x in dic: print(x) #print all values for x in dic: print(dic[x])