This article mainly introduces the usage of the Len () method of handling strings in Python, which is the basic knowledge of the introduction of Python, and can be consulted by friends.
The Len () method returns the length of the string.
The following is the syntax for the Len () method:
The length of the string returned by this method.
The following example shows the use of the Len () method.
|1 2 3 4 5||#!/usr/bin/python str = "This is string Example....wow!!!"; Print "Length of the string:", Len (str);|
When we run the above program, it produces the following results:
|1||Length of the String:32|