0 votes
1 view
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 (107k 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.8k points)
+3 votes
2 answers
asked May 28, 2019 in Python by Ritik (3.5k points)
0 votes
2 answers
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...