I don't know who said it. I used the word "attributed" because that's what most websites such as this one
(also goodreads) give as the source--but without saying when or where it was said. I'm always suspicious of quotes on the web!
EDIT: The Essential Groucho: Writings by, for and About Groucho Marx
edited by Stefan Kanfer credits Groucho as the source. That isn't to say he is, as I've known more than one book to contain bogus quotes.