Separating/accessing a triple tuple list like [[[x,y],z],p]?
<p>I am trying to access variables stored in a triple tuple list in python and I am not sure how to do it. I would like to be able to go through the list in a for loop and get x,y,x, &amp; p from each tuple. How would I do that? </p>

<pre><code>MovesList = [  [[[1,2],3],1] , [[[2,5],3],1] , [[[1,3],0],2]  ]
</code></pre>

<p>same unpacking with list comprehension</p>

<pre><code>In [202]: [[x,y,z,p] for ([[x,y],z],p) in MovesList]
Out[202]: [[1, 2, 3, 1], [2, 5, 3, 1], [1, 3, 0, 2]]
</code></pre>

python