def number_range(a, b):
    """
    Generate consecutive values list between two numbers.
    """
    if (a == b):
        return [a]
    else:
        mx = max(a, b)
        mn = min(a, b)
        result = []
        # inclusive upper limit. If not needed, delete '+1' in the line below
        while (mn < mx + 1):
            # We go from min to max
            result.append(mn)
            mn += 1
        if a > b:
            # Reverse the list if the first number is bigger than the second
            result = reversed(result)
        return result