In Clojure, we have a function like this
(reductions str ["foo" "bar" "quax"])
=> ["foo" "foobar" "foobarquax"]
or
(reductions + [1 2 3 4 5])
=> [1 3 6 10 15]
It's basically just reduce but it collects the intermediate results.
I'm having trouble finding an equivalent in Python. Does a base library function exist.
Python 3