关于作者

Discuss / Python / 交作业

交作业

Topic source

weareguyshot

#1 Created at ...

def triangles(n): l=[1] num=1 while num<=n: yield l l1=[0]+l l2=l+[0] l=[l1[i]+l2[i] for i in range(len(l1))] num=num+1 for i in triangles(10): print i


  • 1

Reply

WARNING: You are using an old browser that does not support HTML5. Please choose a modern browser (Chrome / Microsoft Edge / Firefox / Sarafi) to get a good experience.