don't understand error message

Manuel Hendel manuel at hendel.net
Tue Sep 17 04:23:36 EDT 2002


I do the following,

domains = []

for line in lines:
    line = string.strip(line)[1:-1]
    fields = string.split(line, "|")
    if fields[3] not in domains:
        domains.append(fields[3])

error:

Traceback (most recent call last):
  File "./pop3create.py", line 16, in ?
    if fields[3] not in domains:
IndexError: list index out of range

Thanks,
    Manuel

-- 
When a man stops trying to prove he is a man, he is a man. 
-D. Talmadge Gosnell 




More information about the Python-list mailing list