Convert String to Title Case
Another example of converting to title case using string methods.
BeginnerTopic: String Programs
Python Convert String to Title Case Program
This program helps you to learn the fundamental structure and syntax of Python programming.
# Program to convert string to title case
s = input("Enter a sentence: ")
print("Title case:", s.title())Output
Enter a sentence: python STRING programs Title case: Python String Programs
Understanding Convert String to Title Case
Demonstrates reusing .title() directly on user input.
Note: To write and run Python programs, you need to set up the local environment on your computer. Refer to the complete article Setting up Python Development Environment. If you do not want to set up the local environment on your computer, you can also use online IDE to write and run your Python programs.