I'm trying to output a right triangle with numbers. Here is what I have so far:
for i in range(1, 10):
for j in range(i):
print(i, end='')
print()
My output is this
1
22
333
4444
55555
666666
7777777
88888888
999999999
My question is this. Can I make these numbers run in sequence using a nested for loop example:
1
12
123
1234
12345
123456
1234567
12345678
123456789
I've tried about 6 other sets and mostly keep getting the same output or multiple errors. Can anyone help me out with this?