0

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

Valeriy
  • 1,365
  • 3
  • 18
  • 45
YaelF
  • 1
  • 1

1 Answers1

0

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
Mike Müller
  • 82,630
  • 20
  • 166
  • 161