length of string in python3 code example
Example 1: how to get length of string in python
string = "test"
print(len(string))
#>>> Output "4"
Example 2: length of a string python
# Python program to demonstrate the use of
# len() method
# Length of below string is 5
string = "geeks"
print(len(string))
# Length of below string is 15
string = "geeks for geeks"
print(len(string))