logo CodeStepByStep logo

mirror

Language/Type: Python list collections

Write a function named mirror that accepts a list of strings as a parameter and appends the list's contents to itself in reverse order. For example, if a list named letters stores ["a", "b", "c"], the call of mirror(letters) should change it to store ["a", "b", "c", "c", "b", "a"].

Constraints: You may declare a single list as auxiliary storage.

Function: Write a Python function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.