Post History
Python 3, 74 bytes def f(a): d={x:0 for x in a};r=[] for x in a:d[x]+=1;r+=[d[x]] return r Try it online!
Answer
#1: Initial revision
# [Python 3], 74 bytes <!-- language-all: lang-python --> def f(a): d={x:0 for x in a};r=[] for x in a:d[x]+=1;r+=[d[x]] return r [Try it online!][TIO-l61tbyom] [Python 3]: https://docs.python.org/3/ [TIO-l61tbyom]: https://tio.run/##dY5Pa4NAEMXvfoohJyVzqJqm1LCHQFIo9FDIcZFi4ywKYZV1LRbxs9v909iS0pnL7tv3fvvaT101Mp3nkgSIsIiyAEo2DtkdiEbBALWEYtopxvPgl5KVfMjXLN6pNeP2bF4V6V5JULOmTp@LjjpgwAMwE/IYY0zcxm5TTHMEHjshsVfc4L095xF@Z1J8MNIGH50hwS1ufeZnPdBkXCQPAlvx@r9tunTJnKOWba8RaGjprKl8a3ptBNPz6nOuRRWhC3h6LZYHdkvwdDutqqUOxep1fzodD5lBjI4xRYY3eve08kS6dPQ3@bR/fvk3idBVTX8poSo@CN6JJIw3XSx9/gI "Python 3 – Try It Online"