how to randomly select elements from an array in python