with open(filename1) as f1:
    with open(filename2) as f2:
        if f1.read() == f2.read():
            pass
In Python, is there a concise way of comparing whether the contents of two text files are the same?