From bae9bb20a4189065ad79aa33a3ac2f8593e3e1f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BB=D0=B0=D1=81=D1=81?= Date: Fri, 8 May 2026 17:59:32 +0300 Subject: [PATCH] final --- main.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index e1b904b..8c8055c 100644 --- a/main.py +++ b/main.py @@ -1 +1,11 @@ -print("a") +def is_anagram(a: str, b: str) -> bool: + cleaned_a = sorted(a.lower().replace(" ", "")) + cleaned_b = sorted(b.lower().replace(" ", "")) + return cleaned_a == cleaned_b +def main(): + print("Тест 1: "+ str(is_anagram("listen", "silent"))) + print("Тест 1: " + str(is_anagram("Апельсин", "Спаниель"))) + print("Тест 1: " + str(is_anagram("hello", "world"))) + +if __name__ == '__main__': + main() \ No newline at end of file