def isNumber(str_val):
    """
    A function which tests whether the input string contains a number of not.
    """
    try:
        float(str_val)  # for int, long and float
    except ValueError:
        try:
            complex(str_val)  # for complex
        except ValueError:
            return False
    return True