Answers for "python lenght string"

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
0

python 3 string length

#!/usr/bin/python3

str = "this is string example....wow!!!"
print ("Length of the string: ", len(str))
Posted by: Guest on May-03-2020

Python Answers by Framework

Browse Popular Code Answers by Language