collections.Counter()

  • + 1 comment

    in Python 0 == False, so if shoes[size] is 0 this will evaluate to False otherwise it will be True.