how can i print a range of numbers without a list in python?

Question:

for make in range(1, content+1):
    print(make)

Result:

1
2
3
4
5

But i want them like this :

1 2 3 4 5 6 7

Asked By: unknown

||

Answers:

You need to modify the print command to tell it the separator to use with the "end" argument:

for make in range(1, content+1):
    print(make,end=' ')
Answered By: joe90
Categories: questions Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.