On Sun, Oct 21, 2012 at 9:44 PM, Saad Javed <sbja...@gmail.com> wrote: > My program downloads multiple entry values from the net. I'm trying to > combine them in a list in a particular sequence. > > l = [] > feed1 = urllib2.urlopen(rssPage1) > tree1 = etree.parse(feed1) > x = tree1.xpath("/rss/channel/item/title/text()") > y = tree1.xpath("/rss/channel/item/pubDate/text()") > z = tree1.xpath("/rss/channel/item/link/text()") > for e, f, g in zip(x, y, z): > l.append([e, f, g]) > print l > > The problem I'm facing is that the values don't combine into a single list > ("l"). It keeps printing multiple lists with three values e, f, g as the xml > tree is parsed.
What is the rssPage1? Where is that part? And for readability I'd strong suggest using something other than a lowercase L. l and I look the same in some fonts. 7D9C597B _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor