The following program write three lines and creates a text file. The writelines method can be used to write lines from a list to a text file.
Showing posts with label list. Show all posts
Showing posts with label list. Show all posts
Thursday, April 23, 2015
Saturday, March 28, 2015
Friday, February 13, 2015
Hangman Game
Tuesday, February 10, 2015
Tuesday, November 25, 2014
Word Frequency Counter
This program makes a count of the words on a webpage. The basic outline of the program is as follows:
(1) Use Beautiful Soup to crawl a webpage.
(2) Put words from webpage into list.
(3) Pass this word list into a method that cleans up word list.
(4) Pass this clean word list into method that creates a dictionary with key of word and value of number of times word occurs.
See program below:
(1) Use Beautiful Soup to crawl a webpage.
(2) Put words from webpage into list.
(3) Pass this word list into a method that cleans up word list.
(4) Pass this clean word list into method that creates a dictionary with key of word and value of number of times word occurs.
See program below:
Subscribe to:
Posts (Atom)