G+_L I Posted May 2, 2014 Share Posted May 2, 2014 Small sample program that counts word frequency in a phrase that is entered (or piped in). Uses some cool list comprehension and sorting logic I've found while researching the stuff from the last two episodes. http://pastebin.com/WGs85C9q Link to comment Share on other sites More sharing options...
G+_Darryl Medley Posted May 3, 2014 Share Posted May 3, 2014 Didn't know you could use set() to remove dupes. That's cool. Link to comment Share on other sites More sharing options...
G+_L I Posted May 3, 2014 Author Share Posted May 3, 2014 Yes I've read that Python's syntax and default modules has a lot built in (without having to import anything else) to enable the code look closer to the notation that mathematicians use. Link to comment Share on other sites More sharing options...
Recommended Posts