I dont think this was written by woody allen, there is was an argentinian cartoonist called Quino who was famous for writing and drawing a comic strip called Mafalda, and this quote is often attributed to him. in spanish its called “la vida segun Quino” (life as per quino).