Tuesday, February 27, 2018

Python None vs Empty list

>>> a=[]
>>> b=None
>>> type(a),type(b)
(<class 'list'>, <class 'NoneType'>)
>>> not a, not b
(True, True)
>>> a is None, b is None
(False, True)
>>> a is not None, b is not None
(True, False)
>>> a,b
([], None)

1 comment:

Carruth Vallecillo said...

Automobile title advances are a snappy and basic answer for a few circumstances when you require money rapidly and particularly on the off chance that you have credit issues which leaves couple of other getting choices accessible for you. Auto Title Loans Chicago