Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions