Section 1. Chapter 16
single
Challenge: Find Lines with Keyword
Swipe to show menu
Task
Swipe to start coding
Write a function that prints all lines from a list that contain a specific keyword.
- Iterate through each string in the
lineslist. - For each string, check if the
keywordis present. - Print every string that contains the
keyword.
Solution
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 16
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat