Adds example for efficient and more readable random sample

Just a small comment that I found useful when teaching.