Suppose i have the following nested list:<br><br>&gt;&gt;&gt; x<br>[[&#39;19600894&#39;, &#39;1&#39;, &#39;chr15_76136768&#39;, &#39;MISSENSE&#39;], [&#39;19600894&#39;, &#39;2&#39;, &#39;chr15_76136768&#39;, &#39;MISSENSE&#39;], [&#39;18467762&#39;, &#39;1&#39;, &#39;chr14_23354066&#39;, &#39;MISSENSE&#39;]]<br>
<br><br>How do i obtain from nested list x (given above), the following nested list z:<br><br>&gt;&gt;&gt; z<br>[[&#39;chr15_76136768&#39;, &#39;MISSENSE&#39;], [&#39;chr14_23354066&#39;, &#39;MISSENSE&#39;]]<br><br><br>------<br>
In other words, if the third element of an element of x is the same, then i wish to combine it into a single element. <br>