diff --git a/teams_task1.py b/teams_task1.py index 3c34572..9418eda 100644 --- a/teams_task1.py +++ b/teams_task1.py @@ -32,7 +32,7 @@ for mail, names in emails.items(): import json with open('email_dupes.json', 'w') as f: - json.dump(email_pairs, f) + json.dump(email_pairs, f, indent=4, sort_keys=True) # Search for similar names using SequenceMatcher from difflib # (combinations from itertools might come useful as well). Set similarity score at 85%. @@ -53,6 +53,5 @@ for (str1, str2) in combinations(names, 2): if similarity >= threshold: name_pairs.append((str1, str2, similarity)) -print(name_pairs) with open('name_dupes.json', 'w') as f: json.dump(name_pairs, f, indent=4, sort_keys=True) \ No newline at end of file