Keep only the last few: deque

Your task In the code box, write a function recent(events, n) that gives back the last n events of the stream events as a list, oldest first. Then press Run my code.

Getting the editor ready