Python生成十个元素的矩阵,然后将他们的第n个和第m个元素交换的编程吗
m=2 n=3 tens = [[i for i in range(10)] for _ in range(10)] tens[m],tens[n] = tens[n],tens[m]