0
How can i put these in this code?sentence = input ("Please enter your sentence\n").upper() listOfWord = sentence.split() senten
Frequency and sorting words https://code.sololearn.com/cwBC7WjweGAo/?ref=app
11 Answers
+ 5
Make it yourself, so youâll learn more ;)
+ 4
Your code seems to work. What is your question? Do you want to sort the final dict?
+ 3
Use sorted() function
sorted(listdict)
sorted(dict)
That will sort the elements
+ 3
Elahe Anna BTW, don't use existing class or function names, like "dict", for your own variables, classes or functions. Otherwise, you'll overwrite the original one, and it can result in weird and hard to debug errors.
+ 1
Yes
+ 1
Ok tnxđ„Č
+ 1
I don't know what you mean, but if you want the code in a correct format here it is:
sentence = input("Please enter your sentence\n").upper()
listOfWords = sentence.split()
for word in listOfWords:
print(word)
hope this helps!
0
Can you edit thah code for me plz?đ„ș
0
I think i know what you want
0
Do you want to put this in the bar of the input "please enter your sentence"?
0
zain Shendy It is crystal clear in the previous answers. Pls double check.