txt.upper() #将txt中所有字母大写
txt.lower() #所有字母小写
txt.capitalize() #首字母大写,其他字母小写
txt.title() #所有单词首字母大写,其他小写
关于python中字母大小转换的函数
最新推荐文章于 2022-04-02 11:33:18 发布
txt.upper() #将txt中所有字母大写
txt.lower() #所有字母小写
txt.capitalize() #首字母大写,其他字母小写
txt.title() #所有单词首字母大写,其他小写