diff options
author | Santo Cariotti <santo@dcariotti.me> | 2024-06-27 22:41:06 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2024-06-27 22:41:06 +0200 |
commit | 49357616859faaf9e53468ce71d6cd99bda4fb4a (patch) | |
tree | d861f4962fce25638a348f81609562b85ec18174 /progs/a284.py | |
parent | d653d3598d71fea30d45d118e3d046a3aed53ac1 (diff) |
Restore progs folder
Diffstat (limited to 'progs/a284.py')
-rw-r--r-- | progs/a284.py | 8 |
1 files changed, 4 insertions, 4 deletions
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 |