import fileinput
for line in fileinput.input("emaillist.txt"):
line=line.rstrip('\n\r ')
line= line.split('=')
newlin = line[1]
why is this not valid? I am trying to break up the nasty looking line of text and make something useful out of it? Doesnt the split() function produce a list, which you can address via list[x] ?
Thanks!!!!
Traceback (most recent call last):
File "./clean.py", line 8, in <module>
newlin = line[1]
IndexError: list index out of range