Psalm 119:71

New International Version Bible (NIV)
It was good for me to be afflicted
    so that I might learn your decrees.

Read Psalm 119:71 in other translations