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.
(..) your real army, and went where they weren't. As Robb Stark did to me at Whispering Wood. There are always lessons in failures. Yes. You must be very wise by now. My father always said I was a slow learner. If he was so clever, (..)2017 TvShow: Game of Thrones Title: The Queen's Justice Season: 7 Episode 3