Proverbs 21:11

King James Version Bible (KJV)
When the scorner is punished, the simple is made wise: and when the wise is instructed, he receiveth knowledge.

Read Proverbs 21:11 in other translations