> thanks this solve the error but running the code produces another error ie
>index out of range.
> if line[3] == pattern:
> IndexError: list index out of range
So you need to check that there are at least 4 elements in the line before
trying to access it. Or else catch the exception (see my other post about
unpacking the data)
HTH,
Alan G.
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor