13.2. Iterator Reversed

  • reversed(sequence, /)

  • Return a reverse iterator over the values of the given sequence

13.2.1. Example

>>> data = (1, 2, 3)
>>> result = reversed(data)
>>>
>>> list(result)
[3, 2, 1]