Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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"
 
PREVIOUS NEXT
Tagged: #length #string #python
ADD COMMENT
Topic
Name
2+6 =