Lab 12: Find the most frequent words in a text read from a file
Example
python frequent.py file1.txt -> file1.txt, "the" 12Pre-Lab Questions
def open_file(filename): file = open(filename, 'r') return file
Post-lab Questions
python -c "print open('f0.txt', 'rb').read() == open('f1.txt', 'rb').read()"
Related Material
PreviousLab 12: Compute the most frequently used words from the text fileNextLab 12a: File content sorter
Last updated