I heard this in a wonderful French movie named "Stolen Kisses", by the legend Francois Truffaut.
What is the difference between courtesy and tact?
Courtesy: A man opens a bathroom door and sees a naked woman. He says, "Excuse me, ma'am," and quickly backs out.
Tact: A man opens a bathroom door and sees and naked woman. He says, "Pardon me, sir."