Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Filename: ppp _ 2 . py Write the following function: * name: filter _ line * parameters: string, list, list * returns: filtered / smaller
Filename: ppppy
Write 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started