If given input in INPUT=9 , I would like to get below output
Output:123456789
.1234567
..12345
...123
....1
...123
..12345
.1234567
123456789
S = 9 t=[] for i in range(1,S+1): t.append(i) for i1 in range(0,S): print(''.join(str(e) for e in t)) for i in range(S-1,0,-1): t[i]=t[i-1] t[i1]='.' for i in range(S - 1, 0, -1): t[i] = t[i - 1] t[i1] = '.'
Output:My output
123456789
..1234567
....12345
......123
........1
.........
.........
.........
.........
please help , i been breaking my head from morning