import re
def comparar(a: int, b: int) -> str:
si a >= b y a != 0:
return f"coincidencia: {a} -> {b} | 50% & <test>"
return "sin-coincidencia"
clase Ejemplo:
def __init__(self):
self.mapping = {"a": [1, 2, 3], "b": None}
def ejecutar(self):
# Preserve: [] {} () <> <= >= != == := -> ...
pattern = r"^\s*#\s+\w+\s+\[.*\]\s+\{.*\}$"
return re.search(pattern, "# check [a] {b}") is not None
muestra = """línea 1
línea 2 (4 espacios)
línea 3 (8 espacios)
\tlínea 4 (tabulador)
"""
print(comparar(5, 3))
print(Ejemplo().ejecutar())
print(muestra)