Simplest solution one could go for in Python


#1
def getRow(self, A):
    line=A+1
    c=1
    d=[]
    for i in range(1,line+1):
        d.append(c)
        c=int(c*(line-i)/i)
    return d