I think that [None] is the same as [], but maybe there is something in my test ...
>>>print len([])
0
>>>print len([None])
1
When should I use None? and []
and another interesting question
>>>c= []
>>>d= []
>>>print c is d
False
>>>a= 1
>>>b=1
print a is b
True
why is the empty list id id different?
source
share