【发布时间】:2019-07-22 14:40:47
【问题描述】:
使用函数
def make_cap(sentence):
return sentence.title()
试用
make_cap("hello world")
'Hello World'
# it workd but when I have world like "aren't" and 'isn't". how to write function for that
a = "I haven't worked hard"
make_cap(a)
"This Isn'T A Right Thing" # it's wrong I am aware of \ for isn\'t but confused how to include it in function
【问题讨论】: