10 lines
298 B
Python
10 lines
298 B
Python
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"))
|
|
|