1、capitalize() 与 title() 区别
capitalize(): 字符串第一个字母大写
title(): 字符串内的所有单词的首字母大写
a="i say hello to you"
print(a.title()) # 'I Say Hello To You'
print(a.capitalize()) # 'I say hello to you'
标签:总结,title,练习,codewars,say,大写,print,capitalize,hello
来源: https://www.cnblogs.com/ylqm/p/13215406.html