Jump to content

Null object: Difference between revisions

revert edits by 216.15.26.97. Read the task description. This task is about the concept referred to as null or nil in other languages, which is None in Python. Task title is not descriptive
(revert edits by 216.15.26.97. Read the task description. This task is about the concept referred to as null or nil in other languages, which is None in Python. Task title is not descriptive)
Line 601:
 
=={{header|Python}}==
<lang python>try:x = None
if x is xNone:
print "x is definedNone"
else:
except NameError:
print "x is undefinednot None"</lang>
Output:<pre>
</lang>
x is None
 
</langpre>
Output:
 
<pre>x is undefined</pre>
 
=={{header|R}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.