tel = {'jack': 4098, 'sape': 4139}
tel['guido'] = 4127
print(tel)
print(tel['jack'])
del tel['sape']
tel['irv'] = 4127
print(tel)
list(tel)
# ['jack', 'guido', 'irv']
print(sorted(tel))

print('guido' in tel)
print('jack' not in tel)

print(dict(sape=4139, guido=4127, jack=4098))

print({x:x**2 for x in (2,4,6)})

knights = {'gallahad': 'the pure', 'robin': 'the brave'}

for k,v in knights.items():
    print(k,v)

for i,v in enumerate(['tic','tak','lol']):
    print(i,v)

questions = ['name', 'quest', 'favorite color']
answers = ['lancelot', 'the holy grail', 'blue']

for q,a in zip(questions,answers):
    print('What is your {0}?  It is {1}.'.format(q, a))

