a =[ [col for col in range(4)] for row in range(4)]for i in a : print(i)print('------------------')for h,zhi in enumerate(a): for l in range(h,len(zhi)): tem = a[l][h] a[l][h] = a[h][l] a[h][l] = temfor j in a : print(j)