Question: I'm not able to remove the spacing in a `for`-loop as numbers are not coming in the same for making the pattern.

My code:

```
for i in range(1,5):
    for j in range(1,i):
       print(j)

```

Produces the following result:

```
1
1
2
1
2
3

```

But my desired output is:

```
1
12
123
1234

```

Answer: 
```
for r in range(1,5):
    for c in range (1,r+1):
        print c,
    print

```

here, the print without argument causes printing in the next line
In order to get all of the numbers on one line, you'll have to use one print statement per line you want. One way you could do this is:

```
for i in range(1, 5):
    print(''.join([str(n) for i in range(1, i)]))

```

Keeping the nested `for` loops you could do:

```
for i in range(1, 5):
    temp = ''
    for j in range(1, i):
        temp += str(j)
    print(temp)

```