user
You need to complete the following task:

Write a function to reverse the order of a list.

list1 = [10, 20, 30, 40]

Answer:
assistant
def reverse_list(list1):
  return list1[::-1]
  
list1 = [10, 20, 30, 40]

list1 = reverse_list(list1)

print(list1)

# Output: [40, 30, 20, 10]