string.capwords() 将每个单词首字母大写 代码: import string s = ' The quick brown fox jumped over the lazy dog. ' print s print string.capwords(s) 结果: The quick brown fox jumped over the lazy dog. The Quick Brown Fox Jumped Over The Lazy Dog. 请按任意键继续. . . string模…