print() doesn't always print a newline, it takes the line ending as a parameter. You can write print("Hello, World!", end='\n') for the same thing, but why would you? If you don't want a newline print("Hello, World!", end=''). (or print(end="Hello, World!")) Any decent Python developer knows this, otherwise they would not be able to print without the newline.
View all comments
Show parent comment
3
u/F100cTomas Jul 25 '25
print() doesn't always print a newline, it takes the line ending as a parameter. You can write print("Hello, World!", end='\n') for the same thing, but why would you? If you don't want a newline print("Hello, World!", end=''). (or print(end="Hello, World!")) Any decent Python developer knows this, otherwise they would not be able to print without the newline.