Sektion 1. Kapitel 16
single
Challenge: Find Lines with Keyword
Stryg for at vise menuen
Opgave
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.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 16
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat