像素翻转

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

#coding=utf-8
class Transform:
    def transformImage(self, mat, n):
        res = []
        for i in range(n):
            rest =[]
            for j in range(n-1,-1,-1):
                rest.append(mat[j][i])
            res.append(rest)
        return res

a = Transform()
a.transformImage([[1,2,3],[4,5,6],[7,8,9]],3)