dictionaries line line translate(line maketrans(''''string punctuation)line line lower(words line split(for word in wordsif word not in countscounts[word elsecounts[word+ print(countscodepart of learning the "art of pythonor "thinking pythonicallyis realizing that python often has built-in capabilities for many common data analysis problems over timeyou will see enough example code and read enough of the documentation to know where to look to see if someone has already written something that makes your job much easier the following is an abbreviated version of the outputenter the file nameromeo-full txt {'swearst' 'all' 'afeard' 'leave' 'these' 'kinsmen' 'what' 'thinkst' 'love' 'cloak' ' 'orchard' 'light' 'lovers' 'romeo' 'maiden' 'whiteupturned' 'juliet' 'gentleman' 'it' 'leans' 'canst' 'having' looking through this output is still unwieldy and we can use python to give us exactly what we are looking forbut to do sowe need to learn about python tuples we will pick up this example once we learn about tuples debugging as you work with bigger datasets it can become unwieldy to debug by printing and checking data by hand here are some suggestions for debugging large datasetsscale down the input if possiblereduce the size of the dataset for example if the program reads text filestart with just the first linesor with the smallest example you can find you can either edit the files themselvesor (bettermodify the program so it reads only the first lines if there is an erroryou can reduce to the smallest value that manifests the errorand then increase it gradually as you find and correct errors check summaries and types instead of printing and checking the entire datasetconsider printing summaries of the datafor examplethe number of items in dictionary or the total of list of numbers common cause of runtime errors is value that is not the right type for debugging this kind of errorit is often enough to print the type of value