python-CSD-kursu/python-temel/iclemler.cities.a.py

4 lines
165 B
Python
Raw Normal View History

2023-06-11 12:23:37 +00:00
cities = ['ankara', 'adana', 'izmir', 'bolu', 'çanakkale', 'amasya']
xcities = [city[:3].upper() for city in cities if city.lower().find('a') != -1]
print(xcities)