You are here : python_2stringstringlen

string.len() - string

             

The method len() returns the length of the string.


  • NA


Syntax

len( str )


Example

#!/usr/bin/python

str = "this is string example....wow!!!";

print "Length of the string: ", len(str)


Output / Return Value

When we run above program, it produces following result −


Length of the string: 32


Limitations


Alternatives / See Also


Reference