0

I need help to complete a test

Good morning community, I need your help to be able to solve a Python test. They ask me to extract the longest word from a text with the "split()" method, I use it with the "max()" method but from all the text I only get two letters. I don't know how to fix it anymore.

15th Jul 2022, 2:55 PM
Jhozmer A. Ramírez P.
Jhozmer A. Ramírez P. - avatar
4 Antworten
+ 1
You should read the documentation for max before using it. Or any function. What happens when using max to compare strings?
15th Jul 2022, 3:45 PM
Mustafa A
Mustafa A - avatar
0
Share your code and we can explain what's going on.
15th Jul 2022, 3:30 PM
Mustafa A
Mustafa A - avatar
0
txt = input() #tu código va aquí: text = txt.split(' ') text1 = max(text) print(text1)
15th Jul 2022, 3:36 PM
Jhozmer A. Ramírez P.
Jhozmer A. Ramírez P. - avatar