Capitalize String in Python Example
Hi Dev,
This post will give you example of capitalize string in python example. you will learn how to use string capitalize in python. I explained simply step by step python string capitalize example. you will learn python string capitalize example.
There is a way to convert a string into capitalizing in python. i will give you one example using capitalize() method to python capitalize first letter of sentence. so let's see the below examples.
so let's see following examples with output:
Example :
main.py
myString = "this is a dog"
# String Convert to capitalize
capString = myString.capitalize()
print(capString);
Output:
This is a dog
- Get Last 2 Digits of Number in Python Tutorial Example
- How to Sum of First and Last Digit of Number in Python?
- How to Get First and Last Digit of Number in Python?
- Get the Last Digit of Number in Python Tutorial Example
- Get the First Digit of Number in Python Tutorial Example
- How to Remove All Decimals from Number in Python?
- How to Convert String to Float with 2 Decimal Places in Python?
- How to Format Number to 2 Decimal Places in Python?