Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Credit: Stephan Diehl, Alex Martelli
The methods of the list type that mutate a list object in place—methods such as append and sort—return None. To call a series of such methods, you therefore need to use a series of statements. You would like those methods to return self to enable you to chain a series of calls within a single expression.