print specific lines of multiple files in python,f.close()