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.
(..) I have to make this call. - I'd strongly advise against that. This is the right thing to do. There's just one lesson left, President Ellis, so run away and kiss your children goodbye Because nothing, not your army, not your red, white, and blue attack dog, can save you. I'll see you soon. (..)2013 Iron Man 3
(..) That's when 'He' happened. Some people call me a terrorist I consider myself a teacher America... Ready for another lesson. In in Sand Creek, Colorado, The U.S. military waited until the friendly Cheyenne Braves had all gone hunting Waited to attack and slaughter the families left behind (..)2013 Iron Man 3