https://www.codecademy.com/courses/learn-python-3/lessons/learn-python-loops/exercises/break
dog_breeds_available_for_adoption = ["french_bulldog", "dalmatian", "shihtzu", "poodle", "collie"]
dog_breed_I_want = "dalmatian"
for dog_breed in dog_breeds_available_for_adoption:
print(dog_breed)
if dog_breed == dog_breed_I_want:
print ("They have the dog I want!")
break
So the question is "Inside your for loop, after you print each dog breed, check if the current element inside dog_breed
is equal to dog_breed_I_want
. If so, print `“They have the dog I want!” "
When I run the code I get the displayed text that I want but " Are you printing out “They have the dog I want!” if the dog_breed exists in the list? " shows up. I think there might be some formatting issue or something where I’m not exactly writing the code how it wants me to but I can’t find where. Any ideas?