for example, I want to print 01234567 so I know I need to write
for i in range(8)
print(i),
and it will print 0 1 2 3 4 5 6 7 instead of change the line for every number but I want it whithout spaces
for example, I want to print 01234567 so I know I need to write
for i in range(8)
print(i),
and it will print 0 1 2 3 4 5 6 7 instead of change the line for every number but I want it whithout spaces
You can use some Python 3 features in Python 2:
from __future__ import print_function
for i in range(8):
print(i, end='')
Output:
01234567