get the length of string in python code example
Example 1: length of string python
string = "hello"
print(len(string))
#>>> Outputs "5"
if len(string) >= 10:
print("This string is grater then 10")
if len(string) <= 10:
print("This string is smaller then 10")
# Outputs "This string is smaller then 10"
Example 2: length of striung pyhton
len(string)