length string python code example
Example 1: how to get the length of a string in python
print(len("Hello, World!!"))
Example 2: length of string python
string = "hello"
print(len(string))
if len(string) >= 10:
print("This string is grater then 10")
if len(string) <= 10:
print("This string is smaller then 10")
Example 3: length of striung pyhton
len(string)
Example 4: python strlen
my_string = "Hello World"
my_list = ["apple", "banana", "orange"]
print(len(my_string))
print(len(my_list))
Example 5: python 3 string length
str = "this is string example....wow!!!"
print ("Length of the string: ", len(str))