0

python problem

62nd code project. I need help under standing what they want meh to do my code is very simple https://code.sololearn.com/c66l3R6m8XJs/#py

24th Nov 2021, 7:39 PM
Jackson Jameson
Jackson Jameson - avatar
4 Respuestas
+ 5
Jackson Jameson You mean the longest word challenge, right? txt = input() txt.split(' ') -> returns a list of each word in txt separated by space "This a sentence" -> ["This", "is", "a", "sentence"] Now you can use a loop to find the longest word in this list.
24th Nov 2021, 7:51 PM
Denise Roßberg
Denise Roßberg - avatar
+ 4
Okay, you've done this on multiple occasions. Please find, copy, and paste the description of the project. Then pop your attempted code in the playground, save it, and copy/paste a link to your code here. We cannot help if we don't know what the problem is, help us help you. https://www.sololearn.com/Discuss/2928706/?ref=app
24th Nov 2021, 7:42 PM
Slick
Slick - avatar
+ 4
print(txt.split()) EDIT: You can omit the argument in the split() method. It splits on spaces by default
24th Nov 2021, 7:46 PM
Slick
Slick - avatar
24th Nov 2021, 8:03 PM
Simon Sauter
Simon Sauter - avatar