Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Python by (240 points)
Hi all, as per the title I want to refer to the null object in Python. How do I go about doing this?

All help appreciated!

1 Answer

0 votes
by (106k points)

In Python there is no concept of null, instead, Python uses None. None tests that two variables refer to the same object. 

See the example below:-

>>> foo is None 

True 

>>> foo = 'bar' 

>>> foo is None 

False

Related questions

0 votes
1 answer
asked Sep 12, 2019 in Python by Sammy (47.6k points)
+3 votes
2 answers
asked May 28, 2019 in Python by Ritik (3.5k points)
0 votes
2 answers

Browse Categories

...