‘title’ method return the title case version of given string.
string_title_case.py
str = 'hello world, How are you'
print('str -> ', str)
print('str in title case -> ', str.title())
Output
str -> hello world, How are you str in title case -> Hello World, How Are You
No comments:
Post a Comment