For the list x = [1, 2, 3]; print(____(x)), the output is [3, 2, 1].
- reversed
- sorted
- x.reverse
- x.sort
The reversed function returns a reverse iterator, and when used with list(), it produces a reversed list.
Loading...
Related Quiz
- In reporting, how is a KPI (Key Performance Indicator) different from a standard metric?
- How does a DBMS ensure data integrity?
- How does a heatmap differ from a bar chart in terms of data representation?
- In Git, what is the function of a 'pull request'?
- In SQL, the _______ keyword is used to sort the result set in either ascending or descending order.