#coding:gbk#6-4词汇表2#参照6.3练习.py#6-5河流
rivers ={'nile':'egypt','yellow river':'china','amazon river':'brazil',}for river,country in rivers.items():print("The "+
river.title()+" runs through "+
country.title()+".")for river in rivers.keys():print(river.title())for country in rivers.values():print(country.title())#6-6调查#favorite_languages.py
favorite_language ={'jen':'python','sarah':'c','edward':'ruby','phil':'python',}for name,language in favorite_language.items():print(name.title()+"'s favorite language is "+ language.title()+".")
tlist =['jen','sarah','justin','john']
tem =[]for name in favorite_language.keys():
tem.append(name)for glist in tlist:if glist in tem:print("Thank you for your cooperation, "+ glist.title())else:print("Please come and join in our investigation, "+ glist.title())