Ad
  • Custom User Avatar

    I think that in your case the comments don't make the code easier to read and understand otherwise your solution is clean. Maybe just less efficient since you used a dict instead of a set.
    Also you did the same "mistake" i did, you can get rid of the else statment because you always want to add the checked value.