I would like to simplify this code and not repeat the if not statement and the print. Only one condition is being added in the first case **`curAccession == data[5]`** and the print is exactly the same. Is there any way to achieve this with a flag or something? Excuse my naive question I'm not familiar with python...

```
    fileName = data[6]
    if data[6][0] == '.':
        fileName = data[5] + data[6]
        if not (curIP == data[0] and curDate == data[1] and curAccession == data[5] and curExtention == data[6]):
            print('%s\t%s' % (data[0] + "," + fileName, data[1]))
    else:
        if not (curIP == data[0] and curDate == data[1] and curExtention == data[6]):
            print('%s\t%s' % (data[0] + "," + fileName, data[1]))

```