题解 | #牛牛的矩阵相加#
牛牛的矩阵相加
https://www.nowcoder.com/practice/730b90507602412fac90a3f106bfa0cd
lis = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] num = int(input()) lis = list(map(lambda x: list(map(lambda i: i * num, x)), lis)) print(lis)
牛牛的矩阵相加
https://www.nowcoder.com/practice/730b90507602412fac90a3f106bfa0cd
lis = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] num = int(input()) lis = list(map(lambda x: list(map(lambda i: i * num, x)), lis)) print(lis)
相关推荐