Python Capitalize String Example Tutorial

Published On: 20/12/2022 | Category: Python

Hi Guys,

Hello all! In this article, we will talk about how to capitalize string in python. it's simple example of python string capitalize example. We will look at example of python string capitalize example. you can see how to use string capitalize in python. Let's get started with how to capitalize first letter in python.

Python provides a method for capitalising a string. I'll give you one example of how to capitalise the initial letter of a sentence in Python using the capitalise() method. So let's look at the samples below.

So let's see bellow example:

Example 1
myString = "this is a cat"
# String Convert to capitalize
capString = myString.capitalize()
This is a cat

It will help you....

Happy Pythonic Coding!