#使用.capitalize()方法
//例如我有一段字符串message,但全部是英文小写,我想让它输出时首字母 i 大写
message = 'i want to learn Python !'
print(message)
//输出结果:i want to learn Python !
new_message = message.capitalize()
print(new_message)
//输出结果:I want to learn python !
#使用.capitalize()方法
//例如我有一段字符串message,但全部是英文小写,我想让它输出时首字母 i 大写
message = 'i want to learn Python !'
print(message)
//输出结果:i want to learn Python !
new_message = message.capitalize()
print(new_message)
//输出结果:I want to learn python !