Answers for "lengthof string in python"

7

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"
Posted by: Guest on April-06-2020
1

how to get the length of a string in python

var = "python is amazing programming language"
print(len(var))
# 38
Posted by: Guest on December-22-2021

Code answers related to "lengthof string in python"

Python Answers by Framework

Browse Popular Code Answers by Language