-1

I have this code but i would like the numbers to be printed next to one another but it doesn't do that it just prints down the screen instead of filling up the screen.

import random
count=2
while count>0:
   print(random.randint(0,1))
Craicerjack
  • 6,203
  • 2
  • 31
  • 39

1 Answers1

1

replace

print(random.randint(0,1))

with

print(random.randint(0,1), end="").

See https://docs.python.org/3/tutorial/inputoutput.html

serv-inc
  • 35,772
  • 9
  • 166
  • 188