You’re looking for the len method, which works on any object with a definable length:
>>>test_string = "Hello"
Hello
>>>len(test_string)
5
For a string, it will treat the string as a list of characters. This means “Hello” has 5, but “Hello ” would have 6, and “Hello World!” would have 12.
solved How do you find the number of letters in a word in python? [duplicate]