By default the output prints in newline but if we want to print side by side then? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

By default the output prints in newline but if we want to print side by side then?

14th Jan 2019, 5:55 PM
Purvaja Durga
Purvaja Durga - avatar
6 Answers
+ 6
Hello, Here is solution: print(i, end="") UPD: As Vaas said just use end="" :) https://code.sololearn.com/cvq6XnN3yjPR/?ref=app
14th Jan 2019, 6:10 PM
just trying to think
just trying to think - avatar
+ 3
Use the end parameter of the print function print('Hello', end = '') print('Python', end = '')
14th Jan 2019, 6:11 PM
Vaas
Vaas - avatar
+ 2
Thank you
14th Jan 2019, 6:11 PM
Purvaja Durga
Purvaja Durga - avatar
+ 1
You just need to add another atribut called end print('hello', end="") Normaly print have defult for end that prints new line print(k, end="/n)
14th Jan 2019, 8:59 PM
Andrej Zrnic
Andrej Zrnic - avatar