concept reversed() in category python
appears as: reversed()

This is an excerpt from Manning's book Tiny Python Projects: Learn coding and testing with puzzles and games.
Here the
reversed()iterator will be added to the end oflines, such that it would have three elements rather than the desired five:>>> lines.append(reversed(gifts[:day])) >>> lines ['On the third day of Christmas,', 'My true love gave to me,', <list_reverseiterator object at 0x105bc8588>]