i have a question about the following code
smaller={}
for( dest in a[neigbour].keys())
if(dest in smaller.keys() == False):
print 'false'
}
I can’t make this code print false.. am I doing something wrong? I wonder if I am doing the correct thing to check the statement dest in smaller.keys() == False
The oppisite of
dest in smaller.keys()isdest not in smaller.keys(). No need to compare toFalseorTrue:Documentation for
inandnot in: http://docs.python.org/library/stdtypes.html#sequence-types-str-unicode-list-tuple-bytearray-buffer-xrange