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

  • Programming and Computer Science
Replies
7
Views
974
  • Programming and Computer Science
Replies
1
Views
717
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
11
Views
1K
Replies
7
Views
686
  • Programming and Computer Science
Replies
5
Views
2K
  • Programming and Computer Science
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Programming and Computer Science
Replies
5
Views
6K
  • Programming and Computer Science
Replies
8
Views
952
Back
Top