check out rand() in the documentation
you'll be able to grab a random value in the range of (in your example) 0 to 10 and use that in the select statement
if I had maya installed (learning the slightly cheaper blender at the minute) then I'd modify your code to get it working but you should be able to figure it out easily enough.
Si