f=lambda n:'\n'.join(' '.join(map(lambda x:str(x).rjust(2,' '),(__import__("math").comb(i,k)for k in range(i+1))))for i in range(n+1))

print(f(7))

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: