def cap_string1(sentence):
    sentence=' '.join([i.capitalize() for i in sentence.split()])
    return sentence

 

def cap_string2(sentence):
   return sentence.title()

 

s='''Python is a programming language that lets you work quickly and integrate systems more effectively'''     
print cap_string1(s)
print cap_string2(s)

 

输出:

Python Is A Programming Language That Lets You Work Quickly And Integrate Systems More Effectively

相关文章:

  • 2022-02-10
  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
  • 2021-11-17
  • 2021-11-21
  • 2022-12-23
  • 2022-01-31
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-19
相关资源
相似解决方案