Python: Change Tuple Order in List Of Tuples
<p>I have a list of tuples like so:</p>

<pre><code>ListOfTuples = [(var1,var2,var3,var4,var5), 
    (var6,var7,var8,var9,var10), 
    (var11,var12,var13,var14,var15),
    (var16,var17,var18,var19,var20)]
</code></pre>

<p>I want to swap two tuples, i.e. have the list like:</p>

<pre><code>ListOfTuples = [(var1,var2,var3,var4,var5), 
    (var6,var7,var8,var9,var10), 
    (var16,var17,var18,var19,var20)
    (var11,var12,var13,var14,var15)]
</code></pre>

<p>I have tried the following unsuccessfully:</p>

<pre><code>ListOfTuples[2], ListOfTuples[3] = ListOfTuples[3] , ListOfTuples[2]
</code></pre>

<p>Can anyone tell me how to do this please?</p>
