Sektion 1. Kapitel 18
single
Challenge: List Files with Extension
Stryg for at vise menuen
Opgave
Swipe to start coding
Write a function that filters and prints filenames ending with ".txt" from a given list.
- Loop through each element in the
filenameslist. - Check if the current filename ends with ".txt".
- If it does, print the filename.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 18
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