我有两个list
,每个都包含从文件中读取的内容。
我应该使用cmp(list1,list2)
or(list1 == list2)
吗?
#! /usr/bin/env py
data = None
with open("sample",'r+') as f:
data = f.readlines()
data[-1] = "abhishe"
data_1 = None
with open("cp.log",'r+') as f:
data_1 = f.readlines()
data_1[-1] = "Goswami"
print "\n\n\n"
print data == data_1
print cmp(data,data_1)