From 4e9e2dc4be7b9d14078e8513e0c81896b0955360 Mon Sep 17 00:00:00 2001 From: Hladu357 Date: Sat, 12 Apr 2025 17:50:02 +0300 Subject: [PATCH] hometask 1: delee print --- teams_task1.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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