Skip to content

Instantly share code, notes, and snippets.

@vedgar
Created July 29, 2017 13:15
Show Gist options
  • Select an option

  • Save vedgar/985c74a79a38fc77d1e33c763c0ac288 to your computer and use it in GitHub Desktop.

Select an option

Save vedgar/985c74a79a38fc77d1e33c763c0ac288 to your computer and use it in GitHub Desktop.
for i in range(len(a) >> 1):
for j in range(len(a[i])+1 >> 1):
a[i][j], a[j][~i], a[~i][~j], a[~j][i] = \
a[j][~i], a[~i][~j], a[~j][i], a[i][j]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment