You can try the following if your csv
has many entries and you want to always skip Start Time
. This will also work if your csv
as only 1 entry as well.
def csv_diff(file_1, file_2):
with open(file_1, "r") as f1, open(file_2, "r") as f2:
for line1, line2 in zip(f1, f2):
if line1.startswith("Start Time"):
continue
if line1.strip() != line2.strip():
print(f"The two files '{file_1}' and '{file_2}' do not match!")
return False
print(f"The two files '{file_1}' and '{file_2}' are a match!")
return True
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…