@perfringo: First of all , input has to be integer, not tuple , list will not support replace.
@ichabod801 : Thanks for your suggestion , but here is what the output comes
@ichabod801 : Thanks for your suggestion , but here is what the output comes
S = 5 H = 1 t=[] for i in range(1,S+1): t.append(i) for j in range(0,S): print(''.join(str(e) for e in t)) t[j] = ('\\') for i in range(S-1, 0, -1): t[i] = t[i-1] t[j] = 1
Output:Not the expected output and i am struggling to replace number to \ after each loop
12345
1\234
11\23
111\2
1111\