0

Why everything in a while lopps is printed on a new line even if i dont speicify it to do se?

9th Jul 2017, 11:44 AM
Terminater
Terminater - avatar
5 odpowiedzi
+ 6
Could you post your code or a link?
9th Jul 2017, 11:52 AM
J.G.
J.G. - avatar
+ 6
By default print() adds a newline after each execution. You can manipulate with what is being added, by using end= parameter: for i in range(10): print(i, end='') >>> 0123456789
9th Jul 2017, 12:39 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 4
Because it specifies a string to be added after each print. By default it is '\n' which symbolizes a newline and you can change it simply to empty string - '' or "". So that *nothing* is added after each print.
9th Jul 2017, 12:47 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 2
Got it👍
9th Jul 2017, 12:50 PM
Terminater
Terminater - avatar
+ 1
why the double inverted coma is used as a parameter
9th Jul 2017, 12:46 PM
Terminater
Terminater - avatar