You may have answered that with the proverb, "Winners never quit, and quitters never win."
But it isn't true . . . at least not entirely.
Persistence is indeed an important element to success, and most success stories include it. A common one is Thomas Edison trying 10,000 different materials before finding the one that made his incandescent light bulb work. Edison was determined to find one that worked and kept trying when many people would have given up.
An often overlooked lesson in the story is that Edison quit 9,999 times. Every time he found a material that didn't work, he quit trying it and started trying something else. Edison faced 10,000 dead ends, and each time he quit trying what didn't work and moved on. When asked how it felt to fail 10,000 times, he is reported to have responded, "I haven't failed, I've found 10,000 ways that didn't work."
Like Thomas Edison, winners quit all the time, moving on from what doesn't work to find what does. Edison considered it just one more step towards his goal. If he didn't quit trying each of the ones that didn't work, he'd never have found the one that did.
When faced with this decision, ask yourself if there is more to be gained from another attempt. If yes, try it again. Even if it doesn't work, there is wisdom to be gained from the attempt. If you think you learned everything possible from the attempt, then it's time to move on.
Winners quit when they're learned from the experience, and persist on to try something else.