Reverse a List

Beginner

Reverse a List

In this fun coding challenge, we're going to flip things around! Your mission is to write a function that takes a list and returns a new list with all the elements in reverse order. We're going to practice using loops and list operations. Get ready to see the world from a different perspective!

For instance, if you were given a list like:

[1, 2, 3, 4, 5]

Your function should return:

[5, 4, 3, 2, 1]

Another example would be a list with letters:

['a', 'b', 'c']

The return list would be:

['c', 'b', 'a']

Things to remember:

  • You cannot print anything.
  • You cannot take input from the user.
  • Just use the given list and return the new reversed list.

Focus on trying to use Python's list features to help you out! Have fun reversing!

Geek
Inputs

Arg 1:

[1,2,3,4,5]
Expected Output
[5, 4, 3, 2, 1]
Actual Output