Some of our players would like to view their inventories in reverse order.
Let's write a function that takes a list as an input and returns a new list except all the items are in reverse order.
For example:
[1, 2, 3] -> [3, 2, 1]
['a', 'b', 'c', 'd'] -> ['d', 'c', 'b', 'a']
The Python range function is very useful when working with lists. It allows you to choose where to start, stop, and how to step over a list.
range(start, stop, step). Don't forget you can use negative values for these arguments!len(...) directly to range(...). For example, range(len(items)) iterates over indices 0 through len(items) - 1.range a starting index?i in each iteration of the loop?