Lab - Word CountΒΆ

Let’s say we want to find out some stats about a book - the total number of words, and the most frequent words. We will use the re and Counter classes to facilitate our work.

Lab - Book Stats

* Download the book text from:  You can
  download it manually; no need to make the program do that.
* Report the number of words in the book.
* Report the top ten most used words in the book.

import re
from collections import Counter

def main():

if __name__ == '__main__':