Python

Python Menu

Python

Python String title() - Definition, Syntax, Parameters, Examples

Definition

The title() method returns a string where the first character in every word is upper case. Like a header, or a title. If the word contains a number or a symbol, the first letter after that will be converted to upper case.

Syntax

string.title()

Parameters

No Parameters.

Examples:

testStr = "Welcome to the Python tutorials" result = testStr.title() print(result)
# another example testStr = "welcome to the python tutorials" result = testStr.title() print(result)

Introduction

Python Basics

Python Advance

Data Science Python Tutorials

Python Functions and Methods