Fwd: use a loop to create lists

2013-04-11 Thread Franz Kelnreiter
-- Forwarded message -- From: Franz Kelnreiter Date: Thu, Apr 11, 2013 at 2:09 PM Subject: Re: use a loop to create lists To: thomas.goe...@ohm-hochschule.de On Thu, Apr 11, 2013 at 1:46 PM, Thomas Goebel < thomas.goe...@ohm-hochschule.de> wrote: > * On 11/04/2013 13:

Re: use a loop to create lists

2013-04-11 Thread Franz Kelnreiter
On Thu, Apr 11, 2013 at 2:57 PM, Thomas Goebel < thomas.goe...@ohm-hochschule.de> wrote: > ... > Which is the same as: > f = {'list_' + str(n):[m for m in range(3)] for n in range(3)} > Thomas, thank you for your patience and your long explanation! Now I understand better this shorthand expressio

Re: Fwd: use a loop to create lists

2013-04-11 Thread Franz Kelnreiter
On Thu, Apr 11, 2013 at 3:43 PM, Thomas Goebel < thomas.goe...@ohm-hochschule.de> wrote: > ... > > I get a syntax error, as I exepected (Python 2.6.4 (r264:75708, Oct 26 > > 2009, 08:23:19)). > > Sorry Franz, > > as you are using python 2.6 you have to use > > d1 = dict(('list_' + str(i), []) for

Re: reading XML file using python

2010-05-17 Thread Franz Kelnreiter
2010/5/17 shanti bhushan : > Hi , > i am new to python.i want to read the XML file using python it ,by > using DOm or SAX any of them. > I want to read the http://www.google.com(any hyper text) from XML and > print that. > please give me the sample program for this. Hi Shanti, The question how to r