0
Average Word Length
I cant solve this test please help me it's in python data structure course lists test
8 Respostas
+ 3
"text" is a string, so you can use the string method replace():
text2 = text.replace(" ", "")
+ 5
If you need help, please show us your code.
+ 3
See if any hint given in these previous discussions can help
https://www.sololearn.com/Discuss/2411015/?ref=app
https://www.sololearn.com/Discuss/2855077/?ref=app
https://www.sololearn.com/Discuss/2121320/?ref=app
https://www.sololearn.com/Discuss/2119972/?ref=app
Always try to search first before posting new questions 👍
+ 3
Then why not ask it directly when posting the thread?
One way could be replaced all " " with "" and then getting the length.
0
i just want to know how to remove the spaces from the count in (len)
0
text = input()
x = text.split()
y = len(text)
print(y/len(x))
this is my code it gave me the solution but it with extra Decimal
it 6.66 and I want it 6
0
i don't understand how to remove the space codeit, please
0
Thanks♥️♥️