Curso_Intensivo_de_PYTHON/chapter_07/pets.py
2023-06-02 17:22:53 +02:00

7 lines
139 B
Python

pets = ['dog', 'cat', 'dog', 'goldfish', 'cat', 'rabbit', 'cat']
print(pets)
while 'cat' in pets:
pets.remove('cat')
print(pets)