In this simple exercise, you will create a program that will take two lists of integers, ```a``` and ```b```. Each list will consist of 3 positive integers above 0, representing the dimensions of cuboids ```a``` and ```b```. You must find the difference of the cuboids' volumes regardless of which is bigger.

For example, if the parameters passed are ```([2, 2, 3], [5, 4, 1])```, the volume of ```a``` is 12 and the volume of ```b``` is 20. Therefore, the function should return ```8```.

Your function will be tested with pre-made examples as well as random ones.

**If you can, try writing it in one line of code.**

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def find_difference(a, b):
	

Solutions:
from numpy import prod

def find_difference(a, b):
	return abs(prod(a) - prod(b))


def find_difference(a, b):
	return abs(a[1] * a[2] * a[0] - b[1] * b[2] * b[0])


from operator import mul
from functools import reduce

def find_difference(a, b):
	return abs(reduce(mul, a) - reduce(mul, b))


def find_difference(a, b):
	A = B = 1
	for (i, j) in zip(a, b):
		A *= i
		B *= j
	return abs(A - B)


find_difference = lambda a, b, p=__import__('numpy').prod: abs(p(a) - p(b))


def find_difference(a, b):
	a_volume = a[0] * a[1] * a[2]
	b_volume = b[0] * b[1] * b[2]
	return abs(a_volume - b_volume)


def find_difference(a, b):
	return abs(p(a) - p(b))

def p(a):
	temp = 1
	for i in a:
		temp *= i
	return temp


import numpy as np

def find_difference(a, b):
	return abs(np.multiply.reduce(a) - np.multiply.reduce(b))


def find_difference(a, b):
	aVol = a[0] * a[1] * a[2]
	bVol = b[0] * b[1] * b[2]
	return abs(aVol - bVol)


from functools import reduce
find_difference = lambda a, b: abs(reduce(lambda x, y: x * y, a) - reduce(lambda x, y: x * y, b))


from functools import reduce
from operator import mul, sub

def find_difference(*cs):
	return abs(sub(*(reduce(mul, c) for c in cs)))


find_difference = lambda *a: abs(sum(((-1) ** i * x * y * z for (i, (x, y, z)) in enumerate(a))))


def find_difference(a, b):
	p = 1
	q = 1
	for nums in a:
		p *= nums
	for nums in b:
		q *= nums
	return abs(p - q)


from numpy import prod
find_difference = lambda a, b: abs(prod(a) - prod(b))


def find_difference(a, b):
	t1 = 1
	t2 = 1
	for num in a:
		t1 *= num
	for num in b:
		t2 *= num
	return abs(t1 - t2)


from operator import mul, sub
from typing import List

def find_difference(a: List[int], b: List[int]) -> int:
	return abs(sub(*list(map(lambda x, y, z: x * y * z, *zip(a, b)))))


def find_difference(a, b):
	value_a = a[0] * a[1] * a[2]
	value_b = b[0] * b[1] * b[2]
	return value_a - value_b if value_a >= value_b else value_b - value_a


def find_difference(a, b):

	def mul(li):
		car = 1
		for i in li:
			car *= i
		return car
	return abs(mul(a) - mul(b))


from functools import reduce

def find_difference(a, b):
	volume = lambda a, b: a * b
	return abs(reduce(volume, a) - reduce(volume, b))


def find_difference(a, b):
	A = 1
	B = 1
	for i in range(len(a)):
		A = A * a[i]
		B = B * b[i]
	return A - B if A > B else B - A


def find_difference(a, b):
	c = a[0] * a[1] * a[2]
	d = b[0] * b[1] * b[2]
	return abs(c - d)


def find_difference(a, b):
	x = a[0] * a[1] * a[2]
	y = b[0] * b[1] * b[2]
	z = x - y
	if z > 0:
		return z
	else:
		return -z


def find_difference(a, b):
	x = y = 1
	for i in a:
		x *= i
	for j in b:
		y *= j
	return abs(x - y)


def find_difference(a, b):
	Va = a[1] * a[2] * a[0]
	Vb = b[1] * b[2] * b[0]
	diff = Va - Vb
	return diff if diff > 0 else -diff


def find_difference(a, b):
	resa = a[0]
	resb = b[0]
	for i in a[1:]:
		resa = resa * i
	for i in b[1:]:
		resb = resb * i
	return abs(resa - resb)


from typing import List

def find_difference(a: List[int], b: List[int]) -> int:
	mult3 = lambda x: x[0] * x[1] * x[2]
	return abs(mult3(a) - mult3(b))


from functools import reduce

def find_difference(a, b):
	prod = lambda x, y: x * y
	return abs(reduce(prod, a) - reduce(prod, b))


def find_difference(a, b):
	aCube = a[0] * a[1] * a[2]
	bCube = b[0] * b[1] * b[2]
	return abs(aCube - bCube)


def find_difference(a, b):
	res1 = 1
	res2 = 1
	for n in a:
		res1 *= n
	for n in b:
		res2 *= n
	return abs(res1 - res2)


from functools import reduce as r
from operator import mul

def find_difference(a, b):
	return abs(r(mul, a, 1) - r(mul, b, 1))


from numpy import prod

def find_difference(a, b):
	(x, y) = (prod(a), prod(b))
	if x > y:
		return x - y
	else:
		return y - x


import math

def find_difference(a, b):

	def prod(arr):
		proc = 1
		for i in arr:
			proc *= i
		return proc
	return abs(prod(a) - prod(b))


def find_difference(a, b):
	aa = a[0] * a[1] * a[2]
	bb = b[0] * b[1] * b[2]
	return max(aa, bb) - min(aa, bb)


import numpy as np

def find_difference(a, b):
	return np.prod(a) - np.prod(b) if np.prod(a) > np.prod(b) else np.prod(b) - np.prod(a)


def find_difference(a, b):
	cube1 = a[0] * a[1] * a[2]
	cube2 = b[0] * b[1] * b[2]
	result = cube1 - cube2
	if cube1 - cube2 < 0:
		result = cube2 - cube1
	return result


def find_difference(a, b):
	a_rez = 1
	b_rez = 1
	for x in a:
		a_rez = a_rez * x
	for y in b:
		b_rez = b_rez * y
	return abs(a_rez - b_rez)


find_difference = lambda a, b: a[0] * a[1] * a[2] - b[0] * b[1] * b[2] if a[0] * a[1] * a[2] - b[0] * b[1] * b[2] > 0 else b[0] * b[1] * b[2] - a[0] * a[1] * a[2]


def find_difference(a, b):
	mx = max(a[0] * a[1] * a[2], b[0] * b[1] * b[2])
	mn = min(a[0] * a[1] * a[2], b[0] * b[1] * b[2])
	return mx - mn


import functools as ft

def find_difference(a, b):
	return abs(ft.reduce(lambda x, y: x * y, a) - ft.reduce(lambda x, y: x * y, b))


import numpy as np

def find_difference(a, b):
	return max(np.prod(a) - np.prod(b), np.prod(b) - np.prod(a))


from functools import reduce

def find_difference(a: list, b: list) -> int:
	return abs(reduce(lambda x, y: x * y, a) - reduce(lambda x, y: x * y, b))


def find_difference(a, b):
	cube_a = cube_b = 1
	for x in a:
		cube_a *= x
	for x in b:
		cube_b *= x
	return abs(cube_a - cube_b)


def find_difference(a, b):
	s1 = a[0] * a[1] * a[2]
	s = b[0] * b[1] * b[2]
	return abs(s - s1)


def find_difference(a, b):
	result = 1
	result2 = 1
	for i in a:
		result = result * i
	for j in b:
		result2 = result2 * j
	return abs(result - result2)


def find_difference(a, b):
	total_a = 1
	total_b = 1
	for i in a:
		total_a *= i
	for c in b:
		total_b *= c
	return abs(total_a - total_b)


def find_difference(a, b):
	x = 1
	y = 1
	for i in range(len(a)):
		x = x * a[i]
	for j in range(len(b)):
		y = y * b[j]
	if x >= y:
		return x - y
	else:
		return y - x


def find_difference(a, b):
	vol_a = a[0] * a[1] * a[2]
	vol_b = b[0] * b[1] * b[2]
	return vol_a - vol_b if vol_a > vol_b else vol_b - vol_a


def find_difference(a, b):
	(mul_a, mul_b) = (1, 1)
	for (num_a, num_b) in zip(a, b):
		mul_a *= num_a
		mul_b *= num_b
	return abs(mul_a - mul_b)


def find_difference(a, b):
	c = a[0] * a[1] * a[2] - b[0] * b[1] * b[2]
	if c < 0:
		return c * -1
	else:
		return c


def find_difference(a, b):
	volA = 1
	volB = 1
	for (x, y) in zip(a, b):
		volA = volA * x
		volB = volB * y
	return abs(volA - volB)


from functools import reduce

def find_difference(a, b):
	from functools import reduce
	vol = lambda _: reduce(lambda x, y: x * y, _)
	return abs(vol(a) - vol(b))


def find_difference(a, b):
	sq1 = a[0] * a[1] * a[2]
	sq2 = b[0] * b[1] * b[2]
	if sq1 > sq2:
		return sq1 - sq2
	else:
		return sq2 - sq1


from numpy import prod

def find_difference(a, b):
	v1 = prod(a)
	v2 = prod(b)
	return abs(v1 - v2)


def find_difference(a, b):
	count1 = 1
	count2 = 1
	for i in a:
		if i < 0:
			return abs(i)
		else:
			count1 *= i
	for j in b:
		if j < 0:
			return abs(j)
		else:
			count2 *= j
	output = count1 - count2
	if output < 0:
		return abs(output)
	return output


def find_difference(a, b):
	c = 1
	d = 1
	for i in a:
		c *= i
	for i in b:
		d *= i
	return max(c - d, d - c)


def find_difference(v, w):
	(a, b, c, d, e, f) = (v[0], v[1], v[2], w[0], w[1], w[2])
	return a * b * c - d * e * f if a * b * c > d * e * f else d * e * f - a * b * c


def v(arr):
	return arr[0] * arr[1] * arr[2]

def find_difference(a, b):
	return abs(v(a) - v(b))


def find_difference(a, b):
	(av, bv) = (1, 1)
	for i in a:
		av *= i
	for i in b:
		bv *= i
	return av - bv if av >= bv else bv - av


def find_difference(a, b):
	a = a[0] * a[1] * a[2]
	b = b[0] * b[1] * b[2]
	if a > b:
		d = a - b
		return d
	else:
		d = b - a
		return d


def find_difference(a, b):
	m = 1
	n = 1
	for x in range(len(a)):
		m *= a[x]
		n *= b[x]
	return abs(m - n)


def find_difference(a, b):
	vola = 1
	for x in a:
		vola *= x
	volb = 1
	for x in b:
		volb *= x
	return abs(vola - volb)


import math

def find_difference(a, b):
	v1 = a[0] * a[1] * a[2]
	v2 = b[0] * b[1] * b[2]
	return math.abs(v1 - v2)


def find_difference(a, b):
	x = 1
	y = 1
	for i in a:
		x = x * i
	for i in b:
		y = y * i
	return x - y if x - y > 0 else y - x


def volume(lens):
	return lens[0] * lens[1] * lens[2]

def find_difference(a, b):
	return abs(volume(a) - volume(b))


def find_difference(a, b):
	accumulator1 = 1
	accumulator2 = 1
	for eachvalue in a:
		accumulator1 = accumulator1 * eachvalue
	for eachvalue in b:
		accumulator2 = accumulator2 * eachvalue
	return abs(accumulator1 - accumulator2)


def find_difference(a, b):
	(x, y, z) = (a[0], a[1], a[2])
	(r, s, t) = (b[0], b[1], b[2])
	volume1 = x * y * z
	volume2 = r * s * t
	difference = volume1 - volume2
	if volume1 > volume2:
		return difference
	else:
		return -difference


def find_difference(a, b):
	vol1 = 1
	vol2 = 1
	for i in range(len(a)):
		vol1 = vol1 * a[i]
		vol2 = vol2 * b[i]
	return max(vol1, vol2) - min(vol1, vol2)


from functools import reduce

def find_difference(a, b):
	a_vol = reduce(lambda x, y: x * y, a)
	b_vol = reduce(lambda x, y: x * y, b)
	return max(a_vol, b_vol) - min(a_vol, b_vol)


def find_difference(a, b):
	print((a, b))
	resulta = 1
	resultb = 1
	for aa in a:
		resulta = aa * resulta
	print((resulta, 'resulta'))
	for bb in b:
		resultb = bb * resultb
	print((resultb, 'resultb'))
	if resulta > resultb:
		return resulta - resultb
	else:
		return resultb - resulta


def find_difference(a, b):
	v1 = a[0] * a[1] * a[2]
	v2 = b[0] * b[1] * b[2]
	if v1 > v2:
		return v1 - v2
	else:
		return v2 - v1


def find_difference(a, b):
	qa = a[0] * a[1] * a[2]
	qb = b[0] * b[1] * b[2]
	return qa - qb if qa > qb else qb - qa


def find_difference(a, b):
	res1 = a[0] * a[1] * a[2]
	res2 = b[0] * b[1] * b[2]
	if res2 > res1:
		res = res2 - res1
	else:
		res = res1 - res2
	return res


def find_difference(a, b):
	d1 = a[0]
	a = a[1:]
	d2 = b[0]
	b = b[1:]
	for i in b:
		d2 *= i
	for i in a:
		d1 *= i
	total = d1 - d2
	if total >= 0:
		return total
	else:
		return -total


def find_difference(a, b):
	cube1 = 1
	cube2 = 1
	for x in a:
		cube1 = cube1 * x
	for y in b:
		cube2 = cube2 * y
	if cube1 >= cube2:
		return cube1 - cube2
	else:
		return cube2 - cube1


from numpy import prod as vol

def find_difference(a, b):
	return abs(vol(a) - vol(b))


def find_difference(a, b):
	sum1 = 1
	sum2 = 1
	for i in a:
		sum1 = sum1 * i
	for j in b:
		sum2 = sum2 * j
	return abs(sum1 - sum2)


import numpy

def find_difference(a, b):
	aa = numpy.prod(a)
	bb = numpy.prod(b)
	return aa - bb if aa > bb else bb - aa


def find_difference(a, b):
	a1 = a[0] * a[1] * a[2]
	b1 = b[0] * b[1] * b[2]
	m = max(a1, b1)
	m1 = min(a1, b1)
	return m - m1


def find_difference(a, b):
	result_a = 1
	result_b = 1
	for i in a:
		result_a = result_a * i
	for t in b:
		result_b = result_b * t
	return abs(result_b - result_a)


def find_difference(a, b):
	aa = a[0]
	ab = a[1]
	ac = a[2]
	ba = b[0]
	bb = b[1]
	bc = b[2]
	return abs(aa * ab * ac - ba * bb * bc)


def find_difference(a, b):
	sum = 1
	sum1 = 1
	for i in a:
		sum = sum * i
	for j in b:
		sum1 = sum1 * j
	if sum - sum1 > 0:
		return sum - sum1
	else:
		return (sum - sum1) * -1


def find_difference(a, b):
	v1 = 1
	v2 = 1
	for (i, j) in zip(a, b):
		v1 = v1 * i
		v2 = v2 * j
	return abs(v1 - v2)


def prod(arr):
	result = 1
	for i in arr:
		result *= i
	return result

def find_difference(a, b):
	return abs(prod(a) - prod(b))


from functools import reduce
import math

def find_difference(a, b):
	return math.fabs(reduce(lambda x, y: x * y, a) - reduce(lambda p, q: p * q, b))


def find_difference(a, b):
	total_a = 1
	for i in range(0, len(a)):
		total_a *= a[i]
	total_b = 1
	for j in range(0, len(b)):
		total_b *= b[j]
	return abs(total_a - total_b)


def find_difference(a, b):
	la = len(a)
	reza = 1
	rezb = 1
	for i in range(la):
		reza *= a[i]
		rezb *= b[i]
	return abs(reza - rezb)


def find_difference(a, b):
	vola = a[0] * a[1] * a[2]
	volb = b[0] * b[1] * b[2]
	if vola > volb:
		diff = vola - volb
		return diff
	if volb > vola:
		diff = volb - vola
		return diff
	if vola - volb or volb - vola == 0:
		return 0


def find_difference(a, b):
	if a[0] * a[1] * a[2] - b[0] * b[1] * b[2] >= 0:
		return a[0] * a[1] * a[2] - b[0] * b[1] * b[2]
	elif b[0] * b[1] * b[2] - a[0] * a[1] * a[2] >= 0:
		return b[0] * b[1] * b[2] - a[0] * a[1] * a[2]


def find_difference(a, b):
	prod1 = 1
	prod2 = 1
	for i in range(3):
		prod1 *= a[i]
		prod2 *= b[i]
	return abs(prod1 - prod2)


def find_difference(a, b):
	p = a[0] * a[1] * a[2]
	q = b[0] * b[1] * b[2]
	return abs(p - q)