search within list to group elements by shared content : <p>if I have list with this content</p>

<pre><code>[MNA1
MNA3
MNA3_1
MNA3_2
MNA2
MPA3_3
MPA3_2
MPA3_1
MPA3
MPB]
</code></pre>

<p>how can I take all values that have the same first four chars in one group
example </p>

<pre><code>MPA3_3
MPA3_2
MPA3_1
MPA3
</code></pre>

<p>must be in one group(list) or any other thing</p>
