Most efficient way to randomly choose a word from a file with a list of words

  • Python
  • Thread starter Wrichik Basu
  • Start date
  • Tags
    File Random
  • #36
Vanadium 50 said:
The OPs dictionary need not be a flat file.
Yes, files like the ones the OP linked to could be pre-processed to add an index section at the front.
 

Similar threads

Replies
7
Views
2K
Replies
8
Views
1K
Replies
4
Views
6K
Replies
1
Views
1K
Replies
8
Views
2K
Replies
5
Views
6K
Back
Top