I have two triangles that has to be in the same raw, both of them are made with the same code:
n = 5
for k in range(n):
for j in range(n):
print('x' if j+k >= n-1 else '', end='')
print()
they have little changes in the 4th line but exept that they are the same. I need to make them to be on the line like this:
x x
xx xx
xxx xxx
xxxx xxxx
help?