def in_range(n, rng_spec):
    """
    Determines if a number is in the specified range. A tuple is considered an
    inclusive range. A single integer is treated as a one-element interval.
    """
    return (n == rng_spec) if type(rng_spec) is not tuple \
        else (rng_spec[0] <= n <= rng_spec[1])