Question: Please answer using ONLY map/filter in PYTHON Write a function that takes two lists of strings of the same length as inputs, teams (the team
Please answer using ONLY map/filter in PYTHON
Write a function that takes two lists of strings of the same length as inputs, teams (the team names) and results (the result for each team). Your function should match the result for each team and return a list of tuples with only teams with "qualified, advanced, winner" in the results list. In each tuple, the first element is the team name and the second element is the recorded information, both as strings.
>>> advance_3(['team1', 'team2', 'team3'], ['qualified', 'out', 'winner']) [('team1', 'qualified'), ('team3', 'winner')] >>> advance_3(['team1', 'team2'], ['eliminated', 'out']) [] >>> advance_3(['team1', 'team2'], ['eliminated', 'advanced']) [('team2', 'advanced')] >>> advance_3([], []) [] """
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
