pets = ["dog","cat","snake","rabbit","hamster"]
for i in pets:
    if i == "rabbit":
        break
    print(i)
dog
cat
snake