Third Time’s a Charm

What does the expression “third time’s a charm” mean?

Definition: Even if you fail at something twice, you may well succeed the third time.

Example: I just need to pass this course to graduate. I’ve already failed the final twice, but third time’s a charm!