+ 4
Print() without a new line
Hi! How can you print without the \n at the end?
5 odpowiedzi
+ 8
In Python, print receives two optional argument:
print(...arr, sep=' ', end='\n')
We are interested in end.
So, all you need to do is write
print('H', end='')
print('i')
+ 5
When you have any queries about a keyword in Python, just type help(keyword) and run.
Like in this case help(print) would get you enough information.
+ 2
I didn't know that, thanks!