help with lists and writing to file in correct order
Steven D'Aprano
steve at REMOVETHIScyber.com.au
Mon Dec 26 20:27:47 EST 2005
On Mon, 26 Dec 2005 13:54:37 -0800, homepricemaps wrote:
> hey folks,
>
> have a logic question for you. appreciate the help in advance.
>
> i am scraping 3 pieces of information from the html namely the food
> name , store name and price. and i am doing this for many different
> food items found ni the html including pizza, burgers, fries etc. what
> i want is to write out to a text file in the following order:
>
> pizza, pizza hut, 3.00
> burgers, burger king, 4.00
> noodles, panda inn, 2.00
>
> html is below. does anyone have good recommendation for how to setup
> the code in such a manner where it writes to the text file in th order
> listed previously? any attempt i have made seems to write to the file
> like this
>
> noodles, panda inn, 3
> noodles, panda inn, 4
> noodles, panda inn, 2
Instead of posting the HTML, how about if you post your code? Unless we
see your code, how do you expect us to find the bug in it?
--
Steven.
More information about the Python-list
mailing list