<reponame>ch1huizong/learning<gh_stars>1-10
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2010 <NAME>.  All rights reserved.
#
"""Sampling from sequences
"""
#end_pymotw_header

import random

with open('/usr/share/dict/words', 'rt') as f:
    words = f.readlines()
words = [ w.rstrip() for w in words ]

for w in random.sample(words, 5):
    print w
    

#!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2010 <NAME>.  All rights reserved.
#
"""Sampling from sequences
"""
#end_pymotw_header

import random

with open('/usr/share/dict/words', 'rt') as f:
    words = f.readlines()
words = [ w.rstrip() for w in words ]

for w in random.sample(words, 5):
    print w
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2010 <NAME>.  All rights reserved. # Sampling from sequences #end_pymotw_header