+ 3

[solved] Why is the program breaking line after every print statement

According to me this code should make a pyramid type pattern of the entered symbol but I don't know why there is a line break after every print statement How can I fix this?? https://code.sololearn.com/cSn544CvKi1o/?ref=app

9th Sep 2019, 11:45 AM
Arsenic
Arsenic - avatar
5 Answers
+ 2
By default, python adds line breaks after print statements. To change that, add end='' to your print statement. Your code is just: print(symbol) Make it: print(symbol, end='')
9th Sep 2019, 11:48 AM
Daniel C
Daniel C - avatar
+ 5
Arsenic line 11, you forgot to write one more "
9th Sep 2019, 11:58 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
+ 2
Thanks Daniel C
9th Sep 2019, 11:49 AM
Arsenic
Arsenic - avatar
9th Sep 2019, 11:54 AM
Arsenic
Arsenic - avatar
9th Sep 2019, 12:01 PM
Arsenic
Arsenic - avatar