From bc3d92f1b4e12253c6b09692fac82bc7bef63942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A8=D0=B8=D0=BC=D1=87=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Wed, 2 Jul 2025 14:19:37 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20comparsion.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comparsion.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/comparsion.py b/comparsion.py index c36aa4f..b1a6ea7 100644 --- a/comparsion.py +++ b/comparsion.py @@ -1,10 +1,8 @@ -def compare(a: str) -> bool: - for i in range(len(a)): - if(a[i].isdigit() == False): - if a[i] == "<": - return int(a[:i]) < int(a[i + 1:]) - else: - return int(a[:i]) > int(a[i + 1:]) - -print(compare("2>5")) +def compare(a: str) -> bool: + for i in range(len(a)): + if(a[i].isdigit() == False): + if a[i] == "<": + return int(a[:i]) < int(a[i + 1:]) + else: + return int(a[:i]) > int(a[i + 1:]) \ No newline at end of file