[Tutor] reading lines from a list of files

Alex Kleider akleider at sonic.net
Tue May 12 05:36:15 CEST 2015


Is there a better (more 'Pythonic') way to do the following?

     for f_name in f_names:
         with open(f_name, 'r') as f:
             for line in f:

As always, thank you, tutors, for all you are doing.

AlexK


More information about the Tutor mailing list