I am using Python version 3.2.3. I am trying to print a list of numbers in a row, the print command seems to always printing the numbers one at row.
Example
numbers = [1, 2, 3, 4, 5];
for num in numbers:
print("\t ", num)
output is:
1
2
...
the required output is 1 2 3 4 5
I would appreciate your help.
P.s. I searched the web in here and most of the questions were related to Python 2.7.
Use the
endargument to suppress (or replace) the automatic EOL output:Or, you should probably just use: