def is_number(s):
    """
    Test if a string is an int or float.

    :param s: input string (word)
    :type s: str
    :return: bool
    """
    try:
        float(s) if "." in s else int(s)
        return True
    except ValueError:
        return False