标签:info http int png lis image return ima img
1 class Solution(object): 2 def transpose(self, A): 3 """ 4 :type A: List[List[int]] 5 :rtype: List[List[int]] 6 """ 7 hang = len(A) 8 lie = len(A[0]) 9 ans = [] 10 for i in range(lie): 11 temp = [] 12 for j in range(hang): 13 temp.append(A[j][i]) 14 ans.append(temp) 15 return ans 16 17 18 if __name__ == ‘__main__‘: 19 solution = Solution() 20 print(solution.transpose([[1, 2, 3], [4, 5, 6], [7, 8, 9]]))
标签:info http int png lis image return ima img
原文地址:https://www.cnblogs.com/panweiwei/p/12800193.html