#529 · Dictionaries and sets · Beginner · 25 XP · about 4 min
A teacher has the class list and the list of students who signed in today. Write absent(class_list, present) that returns the students on the class list who did not sign in, sorted in alphabetical order.
Someone who signed in twice still counts once, and names in present that are not on the class list are ignored. Names must match exactly. Return a sorted list, not a set.
absent(['Ana', 'Ben', 'Cy', 'Dee'], ['Ben', 'Dee']) # returns ['Ana', 'Cy'] absent(['Ana', 'Ben'], ['Ben', 'Ana', 'Ben']) # returns [] absent(['Zoe', 'Max'], []) # returns ['Max', 'Zoe']
No name is on the class list twice.
First solves only, ranked by stars and then time.