Please critique my script
Peter Otten
__peter__ at web.de
Thu Jul 14 16:53:36 EDT 2011
More information about the Python-list mailing list
Thu Jul 14 16:53:36 EDT 2011
- Previous message (by thread): Please critique my script
- Next message (by thread): Please critique my script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
MRAB wrote: >> for line2 in nxxReg.findall(soup): >> nxxlist.insert(count2, line2) >> count2 = count2 + 1 >> > enumerate will help you here: > for count2, line2 in enumerate(nxxReg.findall(soup)): > nxxlist.insert(count2, line2) An insert() at the end of a list is usually spelt append() in Python ;) If you are looking for something less baroque nxxlist = nxxReg.findall(soup) will do, too.
- Previous message (by thread): Please critique my script
- Next message (by thread): Please critique my script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list