capitalize() method in Python
capitalize() method returns a string with its first character capitalized.
Write a Python program to converts the first character to Capital using capitalize() method.
a="this is sample text" print(a.capitalize()) b="THIS IS SAMPLE TEXT" print(b.capitalize()) c="this is SAMPLE text" print(c.capitalize())
This is sample text This is sample text This is sample text