+ 1
print(None) not an empty string
<edit2> This question has been answered. I had read the lesson incorrectly. </edit2> Why does the lesson on None state that it will print an empty string when it prints "None" to the console instead of a blank line? Edit: From the lesson: "When entered at the Python console, it is displayed as the empty string." It displays the string "None", whereas printing an empty string: >>> print(None) None >>> print('') >>>
3 Answers
+ 3
I was thinking the same
and i even tried print(""==None) and got false as result.
Anyway None means there is nothing present, so they might have meant it like getting a none as output means there is nothing present like an empty string.
+ 1
As in the logic of zero
The inventor of zero, the Arab writes :
"... and put a circle so that the space does not remain empty ..."
same for python
+ 1
Thanks Jacob Paul for your response. I read the lesson incorrectly. When None is entered alone onto the console (no print statement), the output is an empty string, meaning
>>>None
>>>
The console just goes to a new line like you entered nothing and just pressed the return key.