From 49357616859faaf9e53468ce71d6cd99bda4fb4a Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Thu, 27 Jun 2024 22:41:06 +0200 Subject: Restore progs folder --- progs/a284.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'progs/a284.py') diff --git a/progs/a284.py b/progs/a284.py index 41d2914..b69395b 100644 --- a/progs/a284.py +++ b/progs/a284.py @@ -1,11 +1,11 @@ -def is_Isomorphic(str1, str2): +def is_Isomorphic(str1,str2): dict_str1 = {} dict_str2 = {} for i, value in enumerate(str1): - dict_str1[value] = dict_str1.get(value, []) + [i] + dict_str1[value] = dict_str1.get(value,[]) + [i] for j, value in enumerate(str2): - dict_str2[value] = dict_str2.get(value, []) + [j] + dict_str2[value] = dict_str2.get(value,[]) + [j] if sorted(dict_str1.values()) == sorted(dict_str2.values()): return True else: - return False + return False \ No newline at end of file -- cgit v1.2.3-18-g5258