input is a key word in Python and shouldn't be used. I did the same but then edited my post
(Jan-18-2017, 07:26 PM)snippsat Wrote: Hmm or.
1 |
with open ( 'emails.txt' , 'r' ) as input : for line in input : print (line)
|
so here get email variable overwritten in every loop iteration email = inputfile.readline()
What we have at end is just the last line stored in email variable. Maybe easier to see if i do the same in my code:
1 |
with open ( 'emails.txt' , 'r' ) as input : for line in input : email = line print (email)
|
He asked for this. To be stored into a variable.