Challenge 2: Search With Loop else — Possible Solution ==================================================================== names = ["Alice", "Bob", "Charlie"] target = "Bob" for name in names: if name == target: print("found!") break else: print("not found") Output (for target = "Bob"): found! If target were instead "Zoe" (not in the list): not found WHY THIS WORKS AS AN ANSWER ------------------------------ The for loop checks each name in turn. When name == target matches, "found!" prints and break exits the loop immediately — this is exactly the break behavior covered earlier in the chapter. The else clause attached to the for loop is the chapter's own loop-else feature: it only runs if the loop completes WITHOUT ever hitting a break. So if target is never found among all three names, the loop finishes normally (no break fired), and "not found" prints from the else clause. If the break DOES fire (a match was found), the else block is skipped entirely — this is the whole point of loop-else as a search pattern: it distinguishes "the loop ended by finding what I wanted" from "the loop ended by exhausting every item," without needing a separate found = False flag variable to track that manually.