6.40.15 Reversing order in a list: revlist
The revlist command reverses the elements of a list or
sequence.
-
revlist takes one argument:
L, a list or sequence.
- revlist(L) returns a list or sequence with the same
elements as L in the reverse order.
Examples.
-
Input:
revlist([0,1,2,3,4])
Output:
- Input:
revlist([0,1,2,3,4],3)
Output: