7 lines
139 B
Python
7 lines
139 B
Python
pets = ['dog', 'cat', 'dog', 'goldfish', 'cat', 'rabbit', 'cat']
|
|
print(pets)
|
|
|
|
while 'cat' in pets:
|
|
pets.remove('cat')
|
|
|
|
print(pets)
|