Finding out if the given two files are identical in Python
✋✋✋💓💓
Following is the code you can use in python to find out if the given two files are identical to each other or not.
file1 = "file name 1"
file2 = "file name 2"
with open(file1) as f:
contentF = f.read()
with open(file2) as g:
contentG = g.read()
if contentF in contentG:
print("yes")
else:
print("No")
💓💓💓💓💓💓💓💓💓💓
Comments
Post a Comment
Write something to CodeWithAbdur!