Filtering out ad comments
Write code · Medium · §5.6, §10.3 Filtering and choosing
From the list of comments, leave out every comment that contains the text "ad" anywhere, and store the remaining comments in clean, in their original order. Use a list comprehension with a condition.
Starter code
comments = ["pretty photo", "came here from the ad", "the best", "free ad, click now"]Solve this problem in your browser
Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.