Given an unknown length list, return a random item in it by scanning it only 1 time.
My idea:
A similar algorithm is Reservoir Sampling (posted by others). But
You use reservoir sampling.
This is not too complicated nor expensive; it is the minimal approach given the constraints that you have (selecting an element from a stream).
It works just fine if you want a random sample size of 1 and if all the elements have the same weight.
When you've simplified the code with a k of 1 and no explicit weighting, its still reservoir sampling.
Not all pseudo random number generators run at the same speed; pick a fast one.
Comments ask what would happen if you re-used the same random number rather than generating a new random number each step:
The Wikipedia link given shows the equivalence to the Yates-Fisher/Knuth shuffle. If you asked what would picking the same random number each step of the shuffle would be, you'd be barking.