Skip to content

Instantly share code, notes, and snippets.

@atvKumar
Created November 1, 2014 05:43
Show Gist options
  • Save atvKumar/1bcdb769c74c797649e8 to your computer and use it in GitHub Desktop.
Save atvKumar/1bcdb769c74c797649e8 to your computer and use it in GitHub Desktop.
Slicing
# In[5]:
x = [[ 795. , 501.0292887 ],
[ 794.97154472, 501. ],
[ 794.96078431, 500. ],
[ 795. , 499.09090909],
[ 795.03921569, 500. ],
[ 795.02777778, 501. ],
[ 795. , 501.0292887 ]]
# In[21]:
print zip(*x)[::-1]
# Out[21]:
#[(501.0292887, 501.0, 500.0, 499.09090909, 500.0, 501.0, 501.0292887),
# (795.0, 794.97154472, 794.96078431, 795.0, 795.03921569, 795.02777778, 795.0)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment