Calculadora: criando a grid de botões

This commit is contained in:
Luiz Otávio
2023-03-01 09:57:16 -03:00
parent 440f69e84f
commit 8c1051e9eb
3 changed files with 25 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
import re
NUM_OR_DOT_REGEX = re.compile(r'^[0-9.]$')
def isNumOrDot(string: str):
return bool(NUM_OR_DOT_REGEX.search(string))
def isEmpty(string: str):
return len(string) == 0