| about | help | code help+videos | done | prefs |
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. mirror(['a', 'b', 'c']) → ['a', 'b', 'c', 'c', 'b', 'a'] mirror(['hello', 'how', 'r', 'you?']) → ['hello', 'how', 'r', 'you?', 'you?', 'r', 'how', 'hello'] mirror(['flabby']) → ['flabby', 'flabby'] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 290 Post-solution available
Copyright Nick Parlante 2017 - privacy