# Reversing order in a list: revlist

### 5.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:

  ⎡ ⎣ | 4,3,2,1,0 | ⎤ ⎦

- Input:
  revlist([0,1,2,3,4],3)
  Output:

  3, | ⎡ ⎣ | 0,1,2,3,4 | ⎤ ⎦