Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> main("dem-small.txt", "CLINTON") >>> ================================ RESTART ================================ >>> >>> main("dem-small.txt", "CLINTON") 2269 >>> ================================ RESTART ================================ >>> >>> main("dem-small.txt", "CLINTON") 2269 <----- 2,269 words in dem-small CLINTON: >>> ================================ RESTART ================================ >>> >>> main("demDebate2015.txt", "CLINTON") 22902 CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: CLINTON: >>> ================================ RESTART ================================ >>> >>> main("demDebate2015.txt", "CLINTON") 22902 CLINTON: CLINTON: ... cut 70 lines CLINTON: CLINTON: CLINTON spoke 74 times >>> main("demDebate2015.txt", "SANDERS") 22902 SANDERS: SANDERS: ... cut 67 lines from here SANDERS: SANDERS spoke 70 times >>> main("demDebate2015.txt", "O'MALLEY") 22902 O'MALLEY: O'MALLEY: ... cut 40 lines from here O'MALLEY: O'MALLEY: O'MALLEY: O'MALLEY spoke 45 times >>> main("repDebate2015.txt", "BUSH") 35204 <------------- 35,204 words in the file BUSH: BUSH: BUSH: ... cut 64 lines BUSH: BUSH: BUSH spoke 69 times >>> main("repDebate2015.txt", "TRUMP") 35204 TRUMP: TRUMP: TRUMP: ... cut 100 lines here TRUMP: TRUMP: TRUMP: TRUMP: TRUMP spoke 107 times >>> main("repDebate2015.txt", "CHRISTIE") 35204 CHRISTIE: CHRISTIE: ... cut 24 lines CHRISTIE: CHRISTIE: CHRISTIE spoke 28 times >>> main("repDebate2015.txt", "CARLSON") 35204 CARLSON spoke 0 times >>> main("repDebate2015.txt", "CARSON") 35204 CARSON: ... cut 28 lines of output here CARSON: CARSON: CARSON spoke 31 times >>> ================================ RESTART ================================ >>> >>> main("repDebate2015.txt", "CARSON") 35204 CARSON spoke 31 times >>> ================================ RESTART ================================ >>> >>> main("repDebate2015.txt", "CARSON") <---- commented out print(len(words)) CARSON spoke 31 times which was 32,204 >>> main("repDebate2015.txt", "BUSH") for repDebate2015.txt BUSH spoke 69 times >>> main("repDebate2015.txt", "TRUMP") TRUMP spoke 107 times >>> main("repDebate2015.txt", "FIORINA") FIORINA spoke 51 times >>> main("repDebate2015.txt", "RUBIO") RUBIO spoke 28 times >>> main("repDebate2015.txt", "CRUZ") CRUZ spoke 27 times >>> >>> main("repDebate2015.txt", "PAUL") PAUL spoke 35 times >>> main("repDebate2015.txt", "WALKER") WALKER spoke 21 times >>> main("demDebate2015.txt", "CLINTON") CLINTON spoke 74 times >>> main("demDebate2015.txt", "SANDERS") SANDERS spoke 70 times >>> main("demDebate2015.txt", "O'MALLEY") O'MALLEY spoke 45 times >>> >>> main("dem-small.txt", "O'MALLEY") O'MALLEY spoke 1 times >>> main("dem-small.txt", "CLINTON") CLINTON spoke 1 times >>> main("dem-small.txt", "SANDERS") SANDERS spoke 1 times >>> main("rep-small.txt", "TRUMP") TRUMP spoke 1 times >>> main("rep-small.txt", "BUSH") BUSH spoke 1 times >>> main("rep-small.txt", "FIORINA") FIORINA spoke 1 times >>> main("rep-small.txt", "PAUL") PAUL spoke 1 times >>> >>> windsor:~/web/1510/debates> wc rep-small.txt 104 1521 8519 rep-small.txt ---- windsor:~/web/1510/debates> windsor:~/web/1510/debates> wc dem-small.txt 160 2269 13337 dem-small.txt ---- windsor:~/web/1510/debates> windsor:~/web/1510/debates> wc repDebate2015.txt 2839 35204 195646 repDebate2015.txt ----- windsor:~/web/1510/debates> wc demDebate2015.txt 1712 22902 131624 demDebate2015.txt ----- >>> main("dem-small.txt", "CLINTON") 2269 <----- 2,269 words in dem-small CLINTON: windsor:~/web/1510/debates> wc dem-small.txt ---- 160 2269 13337 dem-small.txt <---- UNIX word count is 2,269 also ---- >>> ================================ RESTART ================================ >>> >>> main("demDebate2015.txt", "CLINTON") 22902 <-- 22,902 words windsor:~/web/1510/debates> wc demDebate2015.txt ----- 1712 22902 131624 demDebate2015.txt <-- 22,902 words ----- >>> main("repDebate2015.txt", "BUSH") 35204 <------------- 35,204 words in the file via print(len(words)) windsor:~/web/1510/debates> wc repDebate2015.txt ----- 2839 35204 195646 repDebate2015.txt <----- 35,204 words ----- by UNIX wc command