0
Can someone give the solution of longest word project
4 Respuestas
+ 3
An input is given as a text
Find the longest word in the text and print it
Like: "This is a Awesome text"
+ 3
Split the sentence to make a list of the words..
Assign the first word to a variable.
Do a "for in" loop..(.start at sentence[1:])
compare the len of the variable to the len of the current word in the loop..
..reassign the word as necessary.
..or
Although ...I actually used the map function with a lambda then I used the max function and used that max in the index method on the split sentence....(i sound more complicated that it actually is)
+ 2
Post the complete Question.
0
Which programming language?