Proverbs 17:27 in the King James Version
He that hath knowledge spareth his words: and a man of understanding is of an excellent spirit.
Context
26 Also to punish the righteous is not good, nor to flog officials for their integrity.
27 He who spares his words has knowledge. He who is even tempered is a man of understanding.
28 Even a fool, when he keeps silent, is counted wise. When he shuts his lips, he is thought to be discerning.