I'm glad they got caught. That will 'teach them a lesson'! [=they will learn that they should not do that again]
We 'learned our lesson' the hard way. [=we learned from an unpleasant experience]
They studied the 'lessons' [='teachings'] of the great philosophers.
(..) - Okay. - You done? - Get a little high - High... Oh... - Not gonna learn my lesson When we're running out of time - So why - Why, why... - Okay, enough, enough. (..)2018 Fifty Shades Freed