What I learned some time after gaining an appreciation for the Marx Brothers movies was that the script originally written for the film were often very different. As I understand it, the Marx Brothers (or the studio) would hire professional writers to help the Marx Brothers develop a basic story and layer in as many jokes as they could. The next step wasn't to go into the studio and shoot the film, though. The Marx Brothers took their shiny new script and toured the many Vaudeville theaters around the country at the time. They would give a show that featured some (or all?) of the scenes from the script and perform it before a live audience.
As the brothers performed, they listened to the audience reaction. Did they laugh at the right time? Did the joke get as big a laugh as the brothers thought it deserved? Would subtle change in wording or delivery result in a bigger laugh? Would a different joke make the audience laugh louder or longer? By the time they were in the studio to shoot the movie, they'd worked on every joke in the film. That's probably why their movies are still considered comedy classics today, almost 100 years later.
If you look closely at that story, you'll see two subtle things that the Marx Brothers did. First, they were willing to get up on stage and try out their material in front of a live audience, never knowing if they were about to bring the house down with laughter or get jeered off the stage. They accepted the possibility of failure as a step toward success. Each time they delivered a joke that fell flat, they knew what didn't work. When a joke got a laugh, they tried altering the timing, delivery, or wording to see if they could get a bigger laugh from it. They perfected not only the script they were performing, but their own comedic craft.
The other thing the Marx Brothers did is a bit more subtle. Experts today say that the best way to improve a skill is to break that skill down into the smallest skills you can meaningfully practice. For example, golfers don't play entire golf games to practice their putting. They go to a putting green and repeatedly practice putting, leaving other swings to be perfected later. Once you've broken down the skill, the key is to find a way to practice it so that you get quick feedback after the practice as to how well you did. By practicing their scripts in front of live audiences, the Marx Brothers got immediate feedback on them. Had they waited until the films were in theaters, it would have been too late. This feedback didn't just improve the movie script. It also helped the Marx Brothers improve their performance skills. They learned what made audiences laugh, what didn't, and how to get the most "bang for the buck" from a joke.
While few of us are likely to be traveling the country playing Vaudeville shows like the Marx Brothers did, we can learn from their example. We can recognize that failing is OK as long as we do our best to learn what we can from the failure and use it to inform our next attempt - rather than letting it stop us from trying again. We can also realize that practicing a skill improves it, provided we receive and process feedback on our performance of the skill promptly.