Aems AemsThe expression evaluates to true because when you sort a list in place for example without creating a new sorted list , the list itself is modified, and the return Value is None. Therefore, a.sort()== None evaluates to true
Do you mean like this ?:
a = [4,2,3,1]
a.sort() will prints the sorted list
a = a.sort() will prints None