擅长:python、mysql、java
<p>只需使用<code>str.title()</code>:</p>
<pre><code>In [73]: a, b = "italic","ITALIC"
In [74]: a.title(), b.title()
Out[74]: ('Italic', 'Italic')
</code></pre>
<p>关于<code>str.title()</code>的帮助:</p>
<pre><code>S.title() -> string
Return a titlecased version of S, i.e. words start with uppercase
characters, all remaining cased characters have lowercase.
</code></pre>