‘title()’ method is used to change each word of string to title case, where each word start with a capital letterxz.
title_case.py
message = "python is a friendly language to experiment"
print(message.title())
Output
$python3 title_case.py Python Is A Friendly Language To Experiment
No comments:
Post a Comment