To get length of a string you can use len() function of python. len() function can be used with several different types in Python - both built-in types and library types.
Have a look at example.
>>> len("HackersFriend") 13
We can also use len() function to get number of items in any python list.
>>> len([1,2,3]) 3