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. -- http://mail.python.org/mailman/listinfo/python-list