Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

length of string python

 length of the string:

  • The len() function gives the length of the string.
  • As it returns the result in integer type.
  • It takes the string as the parameter.
  • We can use len() for list,tuple,set,dictionry.
  • The len() is the built-in function in python programming.
  • Example:  "string"  its length is  6.
Syntax: str(length)

#write a python program to demonstrate the length of the string.

  1. string="america"
  2. print(len(string))
Output: 7




This post first appeared on Java Tutorial - InstanceOfJava, please read the originial post: here

Share the post

length of string python

×

Subscribe to Java Tutorial - Instanceofjava

Get updates delivered right to your inbox!

Thank you for your subscription

×