A quick solution for real-time output of print without line breaks in python, pythonprint
About Python2.x and 3. print does not wrap caused by x: I sent a tweet yesterday and used end = to solve the small horizontal problem. However, due to the screen display problem, if the string length is too large, this will cause inconvenience. When two or more prints are separated, how to maintain horizontal output is usually followed by a comma (,) at the end of the print, but at 3. otherwise, end = "(something)", some signs like ,.; 'Also you can put a word or str in "".
Example:
############################################end1 = "j"end2 = "u"end3 = "s"end4 = "t"end5 = "t"end6 = "e"end7 = "s"end8 = "t"print(end1 + end2 + end3 + end4,end = " ")print(end5 + end6 + end7 + end8)############################################Explain:You can see that i put space between""There will be something in your screen:just testAll the codes was run in python 3.2,if you write the codes in pythons 2.x,like python2.7, ##################################################end1 = "j"end2 = "u"end3 = "s"end4 = "t"end5 = "t"end6 = "e"end7 = "s"end8 = "t"print(end1 + end2 + end3 + end4,)print(end5 + end6 + end7 + end8)#################################################that's all,in python 2.x so the differences is:3.2 end = " "2.7 ,
The quick solution of print output without line breaks in the above python article is to share all the content with you. I hope to give you a reference and support for the customer's house.