I want my output to print on one line and there should be gap after the input taken by the use. 

```
 i = 1
  x = int(input("enter a number to loop" ))

  while(i<=x):
       print('\n',i, end= " ")
       i += 1

```

for my code, my output is not on the same line. how to have an output printed on one line.