The len() method returns the length of the string.
Following is the syntax for len() method −
len( str )
NA
This method returns the length of the string.
The following example shows the usage of len() method.
#!/usr/bin/python3 str = "this is string example....wow!!!" print ("Length of the string: ", len(str))
When we run above program, it produces the following result −
Length of the string: 32