arrays - Unwanted line breaks in python program -


I have written basic code cracking games (like hangers), as detailed below, but when I get it in Python 3.3.1 I do not see code _ _ _ _ _ _ _ as a game of executioner for example; I ideally like it appear in a straight line, I do not have this problem in earlier versions of Python. - I searched and searched and this is slowly making me crazy - can anyone please help? Then I can see an array by adding an array to store a series of code!

code:

  code = "25485" estimate = 'turns = 5 counter = 0 print ("Welcome to Code Cracker") while turns & gt ; 0: for four in the code: four in the estimate: print (four), other: print ("_"), counter + = 1 if counter == 0: print ("\ nYou cracked the code" input = "estimate "= Estimate if the code is not in: turns = - 1 print (" wrong \ n ") print (" you have ", + turns, 'more estimation') If = = changes 0: print (" You have failed to crack the code \ n ")  

In Python 3, Use of sep and termination parameters in Do:

  in [4]: ​​(4) in category I: ...: print ("_", Sep = '', end = '') #output: ____  

Comments