Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Python Crash Course 6-11
- Favorite Cities - P112
- '''
- fav_cities = {
- 'minneapolis' : {
- 'location' : 'minnesota',
- 'flower' : 'ladyslipper',
- 'duck duck' : 'grey duck',
- 'climate' : 'seasonal',
- },
- 'nassau' : {
- 'location' : 'bahamas',
- 'climate' : 'temperate',
- 'duck duck' : 'you got a stutter?',
- },
- 'tokyo' : {
- 'location' : 'japan',
- 'language' : 'japanese',
- 'climate' : 'seasonal',
- },
- }
- citylist = []
- cityinfo = []
- snippets = []
- x = 0
- for fave in fav_cities.keys():
- citylist.append(fave)
- for city in citylist:
- print(city.title())
- if city in fav_cities.keys():
- print(fav_cities[x][location])
- x = (x + 1)
- print(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement