Seneca said this quote

It takes the whole of life to learn how to live, and--what will perhaps make you wonder more--it takes the whole of life to learn how to die.