Weekend Joiners

Data with PythonEasy+10 XP+10

Weekend Joiners

A gym wants to know who signed up at the weekend.

Write weekend_joiners(names, joined). names is a list of member names and joined is a list of the same length with each member's join date as text in the form "YYYY-MM-DD".

Return a list of the names of members who joined on a Saturday or a Sunday, in the same order as the input. If nobody did, return an empty list.

Examples

names = ["Ana", "Ben", "Cara", "Dev"]
joined = ["2024-01-15", "2023-11-30", "2024-03-02", "2023-06-25"]
returns ['Cara', 'Dev']
names = ["Eli", "Fay"]
joined = ["2024-05-01", "2024-05-03"]
returns []

Hints

Solve it to unlock the solution

Once your code passes every test, a reference solution shows up here so you can compare it with yours.

solution.py
CtrlEnterto run