不知道为什么,我就是被这个冒号迷惑了
d = {
'Adam': 95,
'Lisa': 85,
'Bart': 59
}
for key in d:
print key+':',d[key]
months = set(['Jan','Feb'])
x1 = 'Feb'
x2 = 'Sun'
if x1 in months:
print 'x1: ok'
else:
print 'x1: error'
if x2 in months:
print 'x2: ok'
else:
print 'x2: error'