You may have seen this quote many times with many different variations. Some sources say he tried 1 thousand or 7 thousand. I had to look it up and verify what the actual quote was. Turns out this quote is likely a paraphrased quote attributed to Thomas Edison from a friend. It was first published in a Biography in 1910. This quote is the same quote as appeared in that book. Thanks to the Quote Investigator for investigating this one. You can find the article about the quote at the Quote Investigator here. Once again, it is always good form when writing to check your sources, and to find as close to a primary source as possible.
I particularly like this quote because it highlights one of the strengths of the scientific process. When seeking the truth, a scientist cannot ignore results that refute his or her preexisting ideas. Every experiment and observation guides scientists, both formal and informal, towards increasingly accurate knowledge of the natural world.