Exercise 1: A Comment Between Two Selectors — Possible Solution ==================================================================== THE TEST ------------------------------ parse_css("h1, /* comment */ h2 { color: red; }") RESULT ------------------------------ Rule.selectors == ['h1', 'h2'] WHY STRIPPING COMMENTS FIRST IS WHAT MAKES THIS WORK ------------------------------ parse_css's own very first line is `css = strip_comments(css)` -- every later step, including the selector-splitting logic, only ever sees the ALREADY-CLEANED string. By the time selector_text.split(',') runs, the source has already become "h1, h2 " (the comment replaced by nothing at all, leaving just the surrounding whitespace behind). Splitting that on ',' gives ['h1', ' h2 '], and the subsequent `.strip()` on each piece removes the extra whitespace left over from where the comment used to be, producing the clean ['h1', 'h2']. If comment-stripping happened AFTER selector-splitting instead (or not at all), the comment's own literal text -- the slashes, asterisks, and the word "comment" itself -- would end up embedded inside one of the split pieces, producing a broken selector string like "/* comment */ h2" that would never match anything once Chapter 5's real selector matching exists. Doing the strip first, exactly once, at the very top of the function, is what guarantees every downstream step -- selector splitting, declaration parsing, whichever comes next in a future chapter -- never has to think about comments at all.