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.
(..) It could've been a double blind. Keep sweating him. You don't trust anyone, do you, James? No. Then you've learnt your lesson. Get back as soon as you can. We need you. Will do. If you do need time... Why should I need more time? (..)2006 Casino Royale
(..) Same goes for the implant. Can't say I'm too sorry about losing that. I can't believe it. No, neither could I. I thought he had my back. But there you go, lesson learned. Does everyone have a tell? Yes. Everyone. Everyone except you. I wonder if that's why I love you. (..)2006 Casino Royale