Print specific lines of multiple files in Python,f.close()