Friday, March 9, 2018

String len() Method


String len() Method in Python 3


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

Syntax
len( str )

Return Value
       This method returns the length of the string.

Example
#!/usr/bin/python3
str = "this is string example....wow!!!"
print ("Length of the string: ", len(str))

Result
Length of the string: 32