Created
March 5, 2020 01:19
-
-
Save afaqk9394/201e5ee11b932205b1f97ed2ac6f657a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import difflab | |
veggies1 = ''' | |
celery | |
spinach | |
lettuce | |
garlic | |
carrot | |
cabbage | |
potato | |
tomato | |
'''.strip().splitlines() | |
veggies2 = ''' | |
celery | |
spinach | |
onion | |
garlic | |
carrot | |
potato | |
cucumber | |
tomato | |
'''.strip().splitlines() | |
for veggie in difflib.unified_diff(veggies1, veggies2, fromfile='original', tofile='modified', lineterm=''): | |
print(veggie) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment