def str_eval(s: str) -> int:
    """
    Returns product of digits in given string n

    >>> str_eval("987654321")
    362880
    >>> str_eval("22222222")
    256
    """

    product = 1
    for digit in s:
        product *= int(digit)
    return product