def is_number(num):
    pattern = re.compile('^[-+]?[-0-9]\\d*\\.\\d*|[-+]?\\.?[0-9]\\d*$')
    res = pattern.match(num)
    if res:
        return True
    return False
def is_number(num):
    pattern = re.compile('^[-+]?[-0-9]\\d*\\.\\d*|[-+]?\\.?[0-9]\\d*$')
    res = pattern.match(num)
    if res:
        return True
    return False