+ 2
Output
How can I make the program output blank in python? I mean like" "
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?
+ 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 ^^
+ 1
print(" ")
+ 1
@N3tW0rK
Nah, the result will be No Output
+ 1
the result Will be blank output (spaces)
+ 1
I tried,but I only get no output
+ 1
@R- Ry
Did you mean print( \n )?
I use python
+ 1
@visph
I write print(" ")
>>> No output
+ 1
ïŒ R- Ry
If I write print(\n)
Only error occurs
+ 1
You must to enclose the \n in quotes:
print("\n")
Maybe try:
print(" test")
+ 1
@visph
That still doesn't work
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
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.
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.