Making slight modifications of the function that prints the list in the list library