Tutorials Point


  Python Basics
  Python Advanced
  Python Useful References
  Python Useful Resources
  Selected Reading

© 2011 TutorialsPoint.COM


  Home     References     Discussion Forums     About TP  

Python String len() Method


previous next AddThis Social Bookmark Button


Description:

This method returns the length of the string.

Syntax:

len( str )

Parameters:

Here is the detail of parameters:

  • NA

Return Value:

It returns the length of the string.

Example:

#!/usr/bin/python

str = "this is string example....wow!!!";

print "Length of the string: ", len(str);

This will produce following result:

Length of the string:  32


previous next Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names