Python 字符串内置方法学习
def capitalize(self): # real signature unknown; restored from __doc__ """ S.capitalize() -> str Return a capitalized version of S, i.e. make the first character have upper case and the rest lower case. """ return ""
首字母大写
name = str('xiongchaoyuan')
print(name.capitalize())
Xiongchaoyuan

浙公网安备 33010602011771号