How to count the number of letters in a string without the spaces?

后端 未结 13 942
梦谈多话
梦谈多话 2020-12-31 07:45

This is my solution resulting in an error. Returns 0

PS: I\'d still love a fix to my code :)

from collections import Counter
import          


        
13条回答
  •  春和景丽
    2020-12-31 08:20

    Try using...

    resp = input("Hello, I am stuck in doors! What is the weather outside?")
    print("You answered in", resp.ascii_letters, "letters!")
    

    Didn't work for me but should work for some random guys.

提交回复
热议问题