title: Python how to capitalize first letter of a word and last three letters
body: <p>I am trying to capitalize first letter and last three letter of a matched phrase for example having a string:</p>
  <p><code>test = &quot;TEAM_DEV_FTW_SOMETHING&quot;</code></p>
  <p>from that string I want the result to get <code>Team Dev FTW</code></p>
  <p>What I tried so far:</p>
  <p><code>team = &quot; &quot;.join(map(lambda x: x.capitalize(), test.name.split(&quot;_&quot;)[:3]))</code></p>