See
- "Interview Question: Select a Random Line from a File (in Python): A cool and useful algorithm explained and extended" by Carl M. Kadie and Christopher Meek in Towards Data Science.
- "Interview Question: Select a Random Line from a File (in Rust): A cool and useful algorithm explained and extended" by Carl M. Kadie and Christopher Meek (forthcoming).