0
How to solve the longest word problem?
How to find the longest word in this, "This is a test text" #python
4 Réponses
+ 1
Your attempt?
+ 1
Thanks I did it
+ 1
Lol OK.
0
txt = input()
#your code goes here
dic = {}
words = txt.split(" ")
for i in words:
lenth = len(i)
dic[i]=lenth
maxi = max(dic, key = dic.get)
print(maxi)