【python】list转置和前后反转 2023-01-31 03:01:21 python list 反转 以二维grid[][]为例: grid = [[row[i] for row in grid] for i in range(len(grid[0]))] 效果如图: for i in range(10): # fanzhuan grid[i].reverse() 效果如图: 相关文章