#-*-coding:utf-8-*-#__author__ = whyn=input("input the numbers")a=[[col for col in range(n)] for row in range(n)]k=0print("原来的矩阵型状")for h in range(n): print(a[h])print("反转的矩阵型状")for i in a: i=[k]*n a[k]=i k+=1for j in range(n): print(a[j])
时间: 2024-10-12 05:48:07