length of string in Python

 length of string in Python

length of string can be find with the help of len() function in Python. len() function return numbers of item in object but when the object is string then it return number of characters in the string. Let’s see it’s Syntax and an example of it.

Syntax:- len ( object )

Example:-

  1. x="Welcome" 
  2. print(len(x)) 

Comments

Popular posts from this blog

Proassignmenthelp index 27

check whether the given input is alphabet, number or alphanumeric in python

Programmingshark index 19