Ad
  • Custom User Avatar

    yes, I handled that case as you described it

  • Custom User Avatar

    then based on this sample test:

    Test.assert_equals(top_3_words(" //wont won't won't "), ["won't", "wont"])

    are we not required to filter out characters that are from A-Z or (')?

  • Custom User Avatar

    EDIT: this happens using python 3.6
    some of the random test cases test numbers when they were not mentioned in the instructions.

    A word is a string of letters (A to Z) optionally containing one or more apostrophes (') in ASCII. (No need to handle fancy punctuation.)

     Frequencies of the most common words: [13, 25, 19] should equal [25, 25, 23]
    

    also, on the same note: The random test expect duplicate results