Question: Filename: ppp _ 2 . pyWrite the following function: * name: filter _ line * parameters: string, list, list * returns: filtered / smaller version
Filename: ppppyWrite the following function: name: filterline parameters: string, list, list returns: filteredsmaller version of second list Given... the name of an MBTA line green orange, red, etc. a list of MBTA lines green line, orange line, etc. a second list that corresponds with the first same size Return... a filtered version of the second list. For example, given: "green", green line", "red line", "green line" Your function should return a filtered version of the second list, wherever "green" was found in the first: Because the file we're working with uses different names for the lines, your function should be able to take in "green" or "Green" and find the corresponding value "green line" or "Green Line" or "GREEN LINE
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
