Q:

Python: Two Nested Loops

I'm trying to find coding for Python version 3 doing these two things in basic coding (a loop nested inside another loop). I understand the basic premise of:
    for i in range(10)
        for j in range(10)

but I think it's the "i+___" math that's giving me trouble. I'm having trouble giving me these three types of outputs:
First:
    0
    0 1
    0 1 2
    0 1 2 3

Second:
    10
    11 12
    13 14 15
    16 17 18 19

Third:
    0 0 0 0 0 0 0 0 0
    1 1 1 1 1 1 1 1 1 
    2 2 2 2 2 2 2 2 2 

Any help would be greatly appreciated.

A:

For python version 3.
First:
for i in range(4):
    for j in range(i+1):
        print(j, end="")
    print()

Second:
x=10
for i in range(1,5):
    for j in range(x,i+x):
        print(str(j)+" ", end="")
    x+=i
    print()

Third:
for i in range(3):
    print((str(i)+" ")*9)

