id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

konstans@stuy.edu > cleanList
prev  |  next  |  chance

Write a function that accepts two lists as parameters data and thingsToRemove. Remove from the data list any elements that match any of the elements the thingsToRemove list. The data list is returned. Note the data list should be modified, you should NOT make a copy and return that.


cleanList([1, 2, 3, 1], [1, 5]) → [2, 3]
cleanList([1, 2, 3, 1], []) → [1, 2, 3, 1]
cleanList([], [1, 2, 3, 1]) → []

...Save, Compile, Run (ctrl-enter)

def cleanList( data, thingsToRemove ):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy