b =[1] while(True): yield b n=len(b) a=b.copy() for i in range(1,n): b[i]=a[i-1]+a[i] b.append(1) return "end"
Sign in to make a reply
土城剑客