| about | help | code help+videos | done | prefs |
Write a function named remove_all that accepts as a parameter a list of strings along with an element value string, and returns a new list that is the same as the parameter list but with all occurrences of that string removed. For example, if a list named l contains ["a", "b", "c", "b", "b", "a", "b"], the call of remove_all(l, "b") should return ["a", "c", "a"]. remove_all(['a', 'b', 'c', 'b', 'b', 'a', 'b'], 'b') → ['a', 'c', 'a'] remove_all(['x', 'y', 'z', 'y', 'x'], 'x') → ['y', 'z', 'y'] remove_all(['cat', 'dog', 'cat', 'bird'], 'cat') → ['dog', 'bird'] ...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