标签:img end src info %x png 方式 ima code
# 杨辉三角 x = [[1]*i for i in range(1,11)] #数组生成方式 print(x) for i in range(2,10): for j in range(1,i): x[i][j] = x[i-1][j-1] + x[i-1][j] for i in range(0,10): for j in range(10-i): print(" ",end=" ") for j in range(0,i+1): print("%3d"%x[i][j],end=‘ ‘) print()
标签:img end src info %x png 方式 ima code
原文地址:https://www.cnblogs.com/jiaxinwei/p/11621867.html