Last active
April 30, 2020 16:41
-
-
Save raeq/0f06117df1b0c1608095778085032098 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
capitals = {"London", "New York", "Kuala-Lumpur", "Den Haag", "Bern", "Peking"} | |
for city in capitals: | |
if city.find(' ') > 0: | |
print(f"This city's name is comprised of more than one word: {city}") | |
elif city.find('-') > 0: | |
print(f"This city's name is comprised of more than one word: {city}") | |
else: | |
print(f"This city's name is just one word: {city}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment