Web | This Site

Python Basics
Python Advanced
Python Useful References
Python Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM

| Home |  | References |  | Discussion Forums |  | About TP

# Python String capitalize() Method

## Description:

This method returns a copy of the string with only its first character capitalized. For 8-bit strings, this method is locale-dependent.

## Syntax:

    str.capitalize()

## Parameters:

Here is the detail of parameters:

- NA

## Return Value:

It returns a copy of the string with only its first character capitalized

## Example:

    #!/usr/bin/python

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

    print "str.capitalize() : ", str.capitalize()

This will produce following result:

    str.capitalize() :  This is string example....wow!!!

Advertisement

Online Image Processing

Indian Baby Names