0

How can I have each of my outputs on different lines?

Every time that I do for checking my code to see if everything is set correctly my outputs stays on the same line this is so annoying any ideas ?

3rd Oct 2024, 12:49 PM
Jorick Marghem
3 odpowiedzi
+ 1
Jorick Marghem , without having seen your code and without task description we can only guess what issue you have. > please put your code in playground, save it there an then create a link to this code. > post this link here. > also provide a brief task description.
3rd Oct 2024, 3:17 PM
Lothar
Lothar - avatar
0
Show us your code and we can tell you precisely where the issue is. But in general ... Every print statement appears on it's own line. If you are doing things like: print("a b c") then a b c will appear on one line. If you separate it like: print("a") print("b") print("c") The Python print command also supports inline newlines, so you could alternatively print it like this: print("a\nb\nc\n") Everywhere a \n appears will convert into a new line. Finally, if you are adding the parameter end="" to your print statement, you are instructing the print command to not include new lines. print("a", end="") print("b", end="") print("c", end="") That will give you: a b c Without seeing your code, it's hard to know which issue you are dealing with. Suggestion: Put each line in a separate print statement and do not add the: end=""
3rd Oct 2024, 2:23 PM
Jerry Hobby
Jerry Hobby - avatar
0
First of all guys I want to say thx for the explaination you have giving me I will do as your telling me so u guys can have a closer look 😊
3rd Oct 2024, 6:30 PM
Jorick Marghem