Michael Crawford said this quote

Sometimes you learn more from failure than you do from success, and in some ways it's better to have failure at the beginning of your career, or your life.