Created
May 19, 2013 03:55
-
-
Save spratt/5606614 to your computer and use it in GitHub Desktop.
Randomly select 12 words from input words specified one word per line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
import random | |
from sys import stdin | |
words = [] | |
for line in stdin: | |
words.append(line.strip()) | |
print(random.sample(words,12)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment