from math import factorial def triangles(): l = [] while True: n = len(l) l=[int(factorial(n) / (factorial(m) * factorial(n-m))) for m in range(n+1)] yield l
Sign in to make a reply
May_the_Force_be_with_U