Hello Guys!
I need to create a program similar to this explanation
- for each word in the input text:
-
set a variable equal to the length of the set
-
add word to the set
-
if the length of the set is greater than the length of the "old" set:
-
add the word to the dict
-
for k, v in words.items():
-
print(k, v)
I am new to Python so for me it's very difficult to solve that. Can anyone help me?
Thank you in advance