Output | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Output

How can I make the program output blank in python? I mean like" "

1st Feb 2017, 5:59 AM
C.R.Devila
C.R.Devila - avatar
14 Answers
+ 2
@C.R. minitico wrote: "I tried, but I only get no output" Are you sure to not have anything else wich could prevent your code to execute the print function?
1st Feb 2017, 7:15 AM
visph
visph - avatar
+ 2
On which platform/device/os and so on are you running your code? I tried a while ago in code playground to verify if it wasn't linked to the limitation of input/output, but wasn't the case ^^
1st Feb 2017, 7:46 AM
visph
visph - avatar
+ 1
print(" ")
1st Feb 2017, 6:09 AM
Kawaii
Kawaii - avatar
+ 1
@N3tW0rK Nah, the result will be No Output
1st Feb 2017, 6:30 AM
C.R.Devila
C.R.Devila - avatar
+ 1
the result Will be blank output (spaces)
1st Feb 2017, 6:33 AM
Kawaii
Kawaii - avatar
+ 1
I tried,but I only get no output
1st Feb 2017, 6:40 AM
C.R.Devila
C.R.Devila - avatar
+ 1
@R- Ry Did you mean print( \n )? I use python
1st Feb 2017, 6:56 AM
C.R.Devila
C.R.Devila - avatar
+ 1
@visph I write print(" ") >>> No output
1st Feb 2017, 7:17 AM
C.R.Devila
C.R.Devila - avatar
+ 1
@R- Ry If I write print(\n) Only error occurs
1st Feb 2017, 7:30 AM
C.R.Devila
C.R.Devila - avatar
+ 1
You must to enclose the \n in quotes: print("\n") Maybe try: print(" test")
1st Feb 2017, 7:32 AM
visph
visph - avatar
+ 1
@visph That still doesn't work
1st Feb 2017, 7:41 AM
C.R.Devila
C.R.Devila - avatar
0
you are probably getting output but you probably just cant see it. If you want to output blank lines, use the newline character in the print function of the language you are using
1st Feb 2017, 6:45 AM
R- Ry
R- Ry - avatar
0
@C. R. minitico Yes that would be it. What Im trying to say is if youre not printing anything after the blank space there wont be any indication of a blank space.
1st Feb 2017, 7:22 AM
R- Ry
R- Ry - avatar
0
@ C. R. minitico oh I think I see the problem. Try putting the \n in "" marks. I think the compiler is thinkimg that \n is a variabe name.
1st Feb 2017, 7:32 AM
R- Ry
R- Ry - avatar