Why does python 2.5.2 have the following behavior
>>>.extend() ==  False .extend() == None True $ python --version Python 2.5.2
I assume I’m not understanding something here, but intuitively I’d think that .extend() should yield 
Extend is a method of list, which modifies it but doesn’t return
None instead). If you need the modified value as the expression value, use
+, as in
2] x.extend() # Nothing is printed because the return value is None x ==  True x x = [
They do this on purpose so that you will remember that the extend function is actually modifying the list in-place. Same with sort(). It always returns None.