A Day for Everyone

Python for AIMedium+10 XP+10

A Day for Everyone

A group is planning a meet-up. schedules has one list per person, and each list holds the days that person is free, like "mon" or "fri".

Task: write free_for_all(schedules). Return the days that every person is free, each once, as a list sorted alphabetically.

  • If schedules is empty, return [].
  • With only one person, every day they're free counts.

Examples

schedules = [["mon", "wed", "fri"], ["wed", "fri", "sun"], ["fri", "wed"]]
returns ['fri', 'wed']
schedules = [["tue", "sat", "tue"]]
returns ['sat', 'tue']

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