Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Searching
Sorting – sort()
Sorting – sorted()
Sorting – reverse() and reversed()
Summary
17. Question 2

Instruction

Perfect! How about Question 2?

Exercise

Write a function named make_symmetrical(input_list) that returns a new list constructed in the following way:

  1. Takes all the elements from the input list and stores them in a copy.
  2. Appends all but the last element from the input list to the copy, in reverse order.

The function shouldn't modify the original list.

For example, given the list: [1, 2, 3], the function should return [1, 2, 3, 2, 1].