Will any additional code execute after a break statement?

It was good to see someone else scratched their head here. I did figure out the difference between using the string literal and using the dog_breed_I_want variable BUT:

If you do use a string literal in the dog exercise and follow the script from the example, the result is the whole list.

But in the example, the list stops printing at the item “knit dress.” I can’t figure out the difference. Maybe it is some small syntax thing I’m not seeing?

In your list, the element is spelled "dalmatian".

In your condition, the string is spelled "dalmation".

Hence, the condition will not be True.

1 Like

Typo. Doh. Thank you!

1 Like

@lauras32 another real life argument for why code in variables and against a string literal!

Right! This example shows how a small typo can make a big difference in the result.