length of string in Python
length of string in Python
length of string can be find with the help of len() function in Python. len() function return numbers of item in object but when the object is string then it return number of characters in the string. Let’s see it’s Syntax and an example of it.
Syntax:- len ( object )
Example:-
- x="Welcome"
- print(len(x))
Comments
Post a Comment