FIlter data coloum with value in other file with python : I have the data file.log, I want to display all row from the four fields file.log that has the same value in the file list.txt from the results of other data filters

example value in list.txt

    2
    3
    7
    10
    12
    etc

this is my code

    import csv
    
    fileopen = open('file.log', 'r')
    fileout = open('fileout.txt', 'w')
    filefin = open('list.txt', 'r')
    for line in fileopen:
            col = line.split(',')
            if len(col) > 1 and col[3] in filefin.readlines():
                    fileout.write(line) 
            else:
                    pass
    fileopen.close()
    fileout.close()

i have the problem. my code is not running