Here's an example code that prints out the content of a squared matrix in clockwise direction using a loop:
main.py1092 chars30 lines
To use this function, you can create a squared matrix as a 2D list, like this:
main.py63 chars4 lines
And then call the function like this:
main.py53 chars3 lines
gistlibby LogSnag