Python3簡單實現楊輝三角

def createL(l): # 生成楊輝三角的一行     L = [1]     for x in range(1, len(l)):         L.append(l[x] + l[x-1])     L.append(1)     return L def printL(L, W): # 打印     s = ""     for x in L:         s += str
相關文章
相關標籤/搜索