*Based on this Numberphile video: https://www.youtube.com/watch?v=Wim9WJeDTHQ*

---

Multiply all the digits of a nonnegative integer `n` by each other, repeating with the product until a single digit is obtained. The number of steps required is known as the **multiplicative persistence**.

Create a function that calculates the individual results of each step, not including the original number, but including the single digit, and outputs the result as a list/array. If the input is a single digit, return an empty list/array.

## Examples
```
per(1)  = []

per(10) = [0]
// 1*0 = 0

per(69) = [54, 20, 0]
// 6*9 = 54 --> 5*4 = 20 --> 2*0 = 0

per(277777788888899) = [4996238671872, 438939648, 4478976, 338688, 27648, 2688, 768, 336, 54, 20, 0]
// 2*7*7*7*7*7*7*8*8*8*8*8*8*9*9 = 4996238671872 --> 4*9*9*6*2*3*8*6*7*1*8*7*2 = 4478976 --> ...
```

Source: codewars | Difficulty: EASY

Starter code: def per(n):
	

Solutions:
def per(n):
	r = []
	while n >= 10:
		p = 1
		for i in str(n):
			p = p * int(i)
		r.append(p)
		n = p
	return r


from functools import reduce

def per(n):
	r = []
	p = reduce(lambda a, b: a * b, map(int, str(n)))
	return r if p == n else [p] + per(p)


from functools import reduce
from operator import mul

def per(n):
	results = []
	while n > 9:
		n = reduce(mul, map(int, str(n)))
		results.append(n)
	return results


def per(n, s=0):
	return ([n] if s else []) + (per(eval('*'.join(str(n))), 1) if n > 9 else [])


def per(n):

	def p(n):
		(q, r) = divmod(n, 10)
		if q == 0:
			return n
		return r * p(q)
	ans = []
	while n // 10 > 0:
		n = p(n)
		ans.append(n)
	return ans


def per(n):
	ans = []
	while n // 10 > 0:
		acc = 1
		for ch in str(n):
			acc *= int(ch)
		n = acc
		ans.append(n)
	return ans


from functools import reduce
from operator import mul

def per(n):
	result = []
	s = str(n)
	while len(s) > 1:
		result.append(reduce(mul, map(int, s)))
		s = str(result[-1])
	return result


from numpy import prod

def per(n):
	if n < 10:
		return []
	arr = []
	while n > 9:
		n = prod([int(i) for i in str(n)])
		arr.append(n)
	return arr


def per(n):
	arr = []
	while n > 9:
		s = 1
		for i in str(n):
			s *= int(i)
		n = s
		arr.append(n)
	return arr


def per(n):
	if n < 10:
		return []
	l = []
	while n > 9:
		total = 1
		num = str(n)
		for i in num:
			total *= int(i)
		l.append(total)
		n = total
	return l