michael
0
Q:

python 3 string length

# Python program to demonstrate the use of 
# len() method   
  
# Length of below string is 5 
string = "geeks" 
print(len(string)) 
  
# Length of below string is 15 
string = "geeks for geeks" 
print(len(string)) 
7
# Python program to demonstrate the use of 
# len() method   
  
# Length of below string is 5 
string = "geeks" 
print(len(string)) 
  
# Length of below string is 15 
string = "geeks for geeks" 
print(len(string)) 
5
#!/usr/bin/python3

str = "this is string example....wow!!!"
print ("Length of the string: ", len(str))
0

New to Communities?

Join the community