Given the following function, what would be the correct and pythonic way to archiving the same (and faster) result?
My code is not efficient and I believe I\'m missin