Skip to content

Instantly share code, notes, and snippets.

@molarmanful
Last active September 23, 2019 11:13
Show Gist options
  • Save molarmanful/ceab3997baa9854ef61ea2ce2f1d5027 to your computer and use it in GitHub Desktop.
Save molarmanful/ceab3997baa9854ef61ea2ce2f1d5027 to your computer and use it in GitHub Desktop.
diag = [y for x, y in enumerate(matrix) if (x + 1) ** .5 == int((x + 1) ** .5)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment