@masterofthetiger@theres.life @Absinthe
One last style thing is that python has some syntactic sugar regarding mathematical operations so you could do:
output[x] *= n
Which multiplies output[x] by n and stores the value back in outout[x].
A minor thing, but is generally the more pythonic way of doing it