Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- travel_log = [
- {
- "country": "France",
- "visits": 12,
- "cities": ["Paris", "Lille", "Dijon"]
- },
- {
- "country": "Germany",
- "visits": 5,
- "cities": ["Berlin", "Hamburg", "Stuttgart"]
- },
- ]
- # Do NOT change the code above
- #TODO: Write the function that will allow new countries
- #to be added to the travel_log.
- def add_new_country(country_, visits_, cities_):
- new_country = {}
- new_country["country"] = country_
- new_country["visits"] = visits_
- new_country["cities"] = cities_
- travel_log.append(new_country)
- # Do not change the code below
- add_new_country("Russia", 2, ["Moscow", "Saint Petersburg"])
- print(travel_log)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement