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
566
  • 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
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Programming and Computer Science
Replies
4
Views
17K
Replies
10
Views
997
  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
14
Views
3K
  • Programming and Computer Science
Replies
19
Views
2K
Back
Top