Files
cursopython2023/aula202-calculadora/utils.py
2023-03-01 09:57:16 -03:00

12 lines
190 B
Python

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