Skip to content

Instantly share code, notes, and snippets.

@pavelzag
Created September 5, 2019 19:49
Show Gist options
  • Save pavelzag/39ed6178fbed005abe296d7771660545 to your computer and use it in GitHub Desktop.
Save pavelzag/39ed6178fbed005abe296d7771660545 to your computer and use it in GitHub Desktop.
def get_language(city_name):
if city_name == 'New York City' or city_name == 'London':
return 'English'
elif city_name == 'Amsterdam':
return 'Dutch'
elif city_name == 'Berlin':
return 'German'
elif city_name == 'Tel Aviv':
return 'Hebrew'
else:
return 'English'
def get_country(city_name):
if city_name == 'New York City':
return 'USA'
elif city_name == 'London':
return 'UK'
elif city_name == 'Amsterdam':
return 'Netherlands'
elif city_name == 'Berlin':
return 'Germany'
elif city_name == 'Tel Aviv':
return 'Israel'
else:
return 'USA'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment