> for line in file: This line is not required as the you have opened your file to 'f'. 'file' is a built-in class. Type - help(file) on the interpreter to know more about it.
> for line in f: > print(line.rstripe()) > f.close() Are you sure that you need to close the file after reading each line? > > I want to try the different methods of opening files and reading them. and processing the data. from there I will then start with writing to files. Bonus : read about the 'with' keyword. > any idea why that does not work? When you say the code does not work, you should provide the exact error or stacktrace that you see. Thanks, Anish _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor