Question: Recently I have started learning python programming language and I got stuck while printing 123..n sequence using this:

```
n=10
print(i for i in range(1,n+1))

```

I got this output:

```
<generator object <genexpr> at 0x7f5990f20db0>                                   

```

Expecting Output:  

 1234....n  

 (Note: Only continuous output)

Answer: 
This line:

```
print(i for i in range(1, n+1))

```

Creates a generator and prints it out, it's exactly what's expected. To print the values as a `list`, which i'm guessing is what you intended, add `[]`:

```
print([i for i in range(1, n+1)])

```

If you intended to print each element on a separate line the syntax is similar but slightly modified:

```
[print(i) for i in range(1, n+1)]

```

EDIT: For everything on the same line as you requested in your comment:

```
print(''.join(str(i) for i in range(1, n+1)))

```
```
n =10

for i in range(1,n+1):
    print(i)

```