Pattern

mail@pastecode.io avatar
unknown
python
2 years ago
163 B
3
Indexable
Never
n = int(input("Enter a number: "))
for i in range(n,-1,-1):
    y=''
    for j in range(i,-1,-1):
        y = y+str(j)
    print(y.ljust(n+1, '0'))

print("\n")