I have a Python Script in which I'm opening two files for reading and when I'm trying to close them, it throws me the AttributeError: 'list' object has no attribute 'close' error.
Excerpt of my script is as below :
firstFile = open(jobname, 'r').readlines()
secondFile = open(filename, 'r').readlines()
{
bunch of logic
}
firstFile.close()
secondFile.close()