The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

Print in the same line using Python 3

Print in the same line using Python 3

0
Votes
1
Answer

Since I am using Python 3, I need to put parenthesis in my print function, and because of that, the function does not understand the comma as me asking it to print all result in one single line. 
 
What should I do?
 
I’ve tried to put the comma both inside and outside the parenthesis, but it did not work.

1 Answer

365 Team
0
Votes

Hello, Amar!
 
Great to have you in the course and thanks for reaching out!
 
The syntax for doing that in Python 3 is:
 
print (n, end = ', ')
 
Hope this helps.
Best,
365 Team