learn your lesson
US /lɜrn jʊər ˈlɛsən/
UK /lɜrn jʊər ˈlɛsən/

1.
吸取教训, 得到教训
to suffer a bad experience and understand from it not to do the same thing again
:
•
After losing all his money, he finally learned his lesson about gambling.
输光所有钱后,他终于吸取了教训,不再赌博。
•
If you don't study, you'll fail the exam and learn your lesson the hard way.
如果你不学习,你会考试不及格,然后吸取惨痛的教训。