One line Python Code


#1

def getRow(self, A):
def combin(n,r):
def fact(n):
if n ==0 or n == 1:
return 1
return n*fact(n-1)
return int(fact(n)/(fact(n-r)*fact(r )))
return [ combin(A,i) for i in range(A+1)]