Код: Выделить всё
countries = ["America", "Canada", "Australia", "China", "Chile"]
for c in countries:
if c.startswith("C"): # To get countries starting with "C"
countries.remove(c)
print(countries)
Код: Выделить всё
['America', 'Australia', 'Chile']
Подробнее здесь: https://stackoverflow.com/questions/798 ... e-included
Мобильная версия