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

4 lines
165 B
Python

cities = ['ankara', 'adana', 'izmir', 'bolu', 'çanakkale', 'amasya']
xcities = [city[:3].upper() for city in cities if city.lower().find('a') != -1]
print(xcities)