学习笔记(03):Python 面试100讲(基于Python3.x)-改变字符串首字母的大小写

立即学习:https://edu.csdn.net/course/play/26755/340113?utm_source=blogtoedu

改变字符串首字母的大小写:

方法一:字符串变量名.capitalize()

方法二:利用字符串切片方法再进行连接

猜你喜欢

转载自blog.csdn.net/Smile_Lai/article/details/104525813