Print range of numbers on same line
>>>print(*range(1,11))
1 2 3 4 5 6 7 8 9 10
Python one liner to print the range
Python 2
for x in xrange(1,11):
print x,
Python 3
for x in range(1,11):
print(x, end=" ")
for i in range(10):
print(i, end = ' ')
You can provide any delimiter to the end field (space, comma etc.)
This is for Python 3