for k,v in dicts.items():
print(k,v)
forvaluein dicts.values():
print(value)
for name in sorted(dicts.keys()):
print(name)
for name inset(dicts.keys()):
print(name)
while 循环
跳出循环
whileTrue:
city = input(prompt)
if city == 'quit':
break# while 遇到breadk语句,推出循环 else:
print("I'd love to go to " + city.title() + "!")