On 04/05/17 13:50, Stephen P. Molnar wrote: >> I'll assume that's where the problem lies. >> Try checking if the string is not empty before using it: >> >> for line in f.readlines(): >> if line: >> atm_chg.append(float( line.split()[-1] ))
> I have edited the code: > > for line in f.readlines(): > atm_chg.append(float( line.split()[-1] )) > Execution still generates the errors: That's because you didn't include the change that I thought might fix the error. See above. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor