Home > Blockchain >  line it up next to each other (nummbers)?
line it up next to each other (nummbers)?

Time:11-12

so i do not want the results under each other. How can i line it up next to each other? Like 1 1 1 and not 1 under 1 under 1. I did not find any good information about that. I tried print(x,t) but it do not work for for loops or does it?

CodePudding user response:

By default, print() appends a newline character to the end of the string.

To have it not do this, simply use the following:

print("Hello World!", end = "")

CodePudding user response:

Use the end parameter of the print function to prevent line breaks

print(1, end=' ')
  • Related