Skip to content

Instantly share code, notes, and snippets.

@vereperrot
Created April 28, 2020 12:37
Show Gist options
  • Save vereperrot/e1dabad129f4181876d0e748e291ca01 to your computer and use it in GitHub Desktop.
Save vereperrot/e1dabad129f4181876d0e748e291ca01 to your computer and use it in GitHub Desktop.
describe_city.py
def describe_city(city,country="Taiwan"):
if city is "Tainan" or city is "Taipei":
print("\n "+city+" is in "+country)
else:
print("\n "+city+" is not in "+country)
describe_city(city="Tainan")
describe_city(city="Taipei")
describe_city(city="New York")
"""
OUTPUT:
Tainan is in Taiwan
Taipei is in Taiwan
New York is not in Taiwan
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment