The task is to output a representation of the matrix where the top left element is on top, the anti-diagonal is the central row and the bottom right element is at the bottom.For example, consider the following matrix:1 23 45 6The diamond version of this matrix is:  1 3 25 4 6which would correspond to a nested array of [[1],[3,2],[5,4],[6]].This is my program:FNUlQ=Y+Y=QXQN+Y@QN;=Q.TQ;FNUlQ=Hx@QNInH_1=QXQN<@QNH;FNUlQ=QXQN_@QN;=Q>Q1;pQ;How it works:(Q is implicitly assigned to the evaluation of input)FNUlQ=Y+Y=QXQN+Y@QN;FNUlQ                ;         for N in range(len(Q)):     =Y+Y                        Y = Y+           =QXQN+Y@QN              Q[N] = Y+Q[N]=Q.TQ;                         assign('Q',transpose(Q))FNUlQ=Hx@QNInH_1=QXQN<@QNH;FNUlQ                          for N in range(len(Q)):     =Hx@QN                      H = Q[N].index_of()             InH_1                 if H != -1:                  =QXQN<@QNH           Q[N] = Q[N][:H]FNUlQ=QXQN_@QN;FNUlQ         ;                for N in range(len(Q)):     =QXQN_@QN                     Q[N] = reverse(Q[N])=Q>Q1;                         Q = Q[1:]pq;                            print(Q)I am especially interested in advice on the readability of my code.Link to my first attempt.
Diamondize a matrix
pyth