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: 
```
def pentagon(num):

    j = num
    for i in range(0, num + 1):
        print('{}{}'.format(' ' * j, ' *' * i))
        j -= 1

pentagon(2)

```

output

```
 *  
* *

```
x=input('enter some numerical value')

s=''

for i in range(0,x):

```
     for j in range(0,i+1):

              s=s+str(j+1)
     print s
     s=''

```