Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- THREE FILES
- _________________________________________
- dif.py
- ________________________________________
- name1 = input('Enter the name of file1 : ')
- name2 = input('Enter the name of file2 : ')
- f1 = open(name1,'r')
- f2 = open(name2,'r')
- d1 = f1.readlines()
- d2 = f2.readlines()
- if d1==d2:
- print('Yes')
- exit
- for i in range(0,min(len(d1),len(d2))):
- if d1[i]!=d2[i]:
- print('NO')
- print(d1[i])
- print(d2[i])
- ________________________
- words.txt
- ________________________
- line 1
- line 2
- line 3 words
- ________________________
- writers.txt
- ________________________
- line 1
- line 2
- line 3 writers
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement