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.
(..) -My fence seemed confident. -With cash you don't need a fence. -Some lack vision. Probably everybody in cellblock E. That's $. -What's the first lesson in poker? -Never bet on the-- -No, leave emotion at the door. -Right. Today's lesson: How to draw out the bluff. (..)2001 Ocean's Eleven