The difference between Python title vs capitalize functions is how they convert (return) a string.
Where title() function changes the first character in each word to Uppercase and the remaining characters to Lowercase in the string and returns a new string.
And the capitalize() method converts the first character of a string to a capital (uppercase) letter.
Example difference title vs capitalize in Python
Simple example code title() changes every word, but capitalize() only the first word in a sentence:
a = 'silly question' print(a.title()) a = 'silly question' print(a.capitalize())
Do comment if you have any doubts and suggestions on this Python comparison topic.
Note: IDE: PyCharm 2021.3.3 (Community Edition)
All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.
Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.