How do you loop over a sentence and extract words? Python | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

How do you loop over a sentence and extract words? Python

Tried going character by character until space but still don't know how to get the words

1st May 2022, 12:25 PM
Fontebo Achah
Fontebo Achah - avatar
2 Antworten
+ 6
How about you just use split() to automatically create a list of all words in the string.
1st May 2022, 12:27 PM
Slick
Slick - avatar
+ 1
Thanks very much Slick
1st May 2022, 12:30 PM
Fontebo Achah
Fontebo Achah - avatar