Capitalize first letter ONLY of a string in Python
<p>I'm trying to write a single line statement that assigns the value of a string to a variable after having ONLY the first letter capitalized, and all other letters left unchanged.</p>
<p>Example, if the string being used were:</p>
<pre class="lang-py prettyprint-override"><code>myString = 'tHatTimeIAteMyPANTS'
</code></pre>
<p>Then the statement should result in another variable such as <code>myString2</code> equal to:</p>
<pre class="lang-py prettyprint-override"><code>myString2 = 'THatTimeIAteMyPANTS'
</code></pre>