0

WHY IT ISN'T WORKING???

print (''' A B C D ''') I want it to be like this: A B C D

3rd Apr 2022, 10:32 AM
Bla Bla
Bla Bla - avatar
9 Answers
+ 6
Do it like this: print("A\nB\nC\nD) \n is used to add a line break.
3rd Apr 2022, 10:34 AM
Adil
Adil - avatar
+ 4
Do it like this print ('''A B C D''')
3rd Apr 2022, 10:34 AM
Simba
Simba - avatar
+ 4
print("A") print("B") print("C") print("D")
5th Apr 2022, 9:21 AM
Ajit Kumar
Ajit Kumar - avatar
+ 4
Cloud You've got your answer, so, add solved in tags so that people will know that the query is solved. Thank you!
5th Apr 2022, 10:18 AM
Adil
Adil - avatar
+ 3
Ok. Python can use backslash n for newline. Python also has a simple way to print strings with newline character, use 3 single-quote to start and finish. Not a double and a single, not a single and a double, must be 3 of the same quotes. Can also be 3 double quotes eg: print("""new lines are \neasy""") https://code.sololearn.com/cww2t7ksuxL8/?ref=app
3rd Apr 2022, 9:36 PM
HungryTradie
HungryTradie - avatar
+ 2
Oh tks, I did this and it doesn't work lol print ("' A \nB \nC \nD''') and I relise that it doesn' need space
3rd Apr 2022, 10:38 AM
Bla Bla
Bla Bla - avatar
+ 2
L=["A","B","C","D"] for j in L: print(j)
5th Apr 2022, 10:09 AM
UNKNOWN
+ 1
Ok, tks
5th Apr 2022, 10:10 AM
Bla Bla
Bla Bla - avatar
+ 1
Oh ok tks
5th Apr 2022, 10:18 AM
Bla Bla
Bla Bla - avatar