Given an array of numbers, return the difference between the largest and smallest values. 

For example:

`[23, 3, 19, 21, 16]` should return `20` (i.e., `23 - 3`).

`[1, 434, 555, 34, 112]` should return `554` (i.e., `555 - 1`).

The array will contain a minimum of two elements. Input data range guarantees that `max-min` will cause no integer overflow.

Difficulty: introductory

Starter code:

def between_extremes(numbers):
	

Solutions:
def between_extremes(numbers):
    return max(numbers) - min(numbers)

def between_extremes(ns):
    return max(ns) - min(ns)

def between_extremes(a):
    return max(a) - min(a)

# Naive method: 2 iterations
def between_extremes(numbers):
    return max(numbers) - min(numbers)

# Faster method: 1 iteration
def between_extremes(numbers):
    mini, maxi = float('inf'), -float('inf')
    for x in numbers:
        if x > maxi: maxi = x
        if x < mini: mini = x
    return maxi - mini

between_extremes = lambda n: max(n)-min(n)

def between_extremes(numbers):
    a, *b, c = sorted(numbers)
    return c-a

def between_extremes(numbers):
    minimum_value = min(numbers)
    maximum_value = max(numbers)
    output = maximum_value - minimum_value
    return output

# create two variables and store min and max value 
# than subtract maximum value from minimum value
# and store that in final output


def between_extremes(lst):
    lst = set(lst)
    return max(lst) - min(lst)

def between_extremes(numbers):
    numbers.sort()
    b = numbers[-1] - numbers[0]
    return b


def between_extremes(numbers):
    return abs(min(numbers) - max(numbers))