If you take an integer and form the product of its individual digits, you get a smaller number. Keep doing this and eventually you end up with a single digit.
The number of steps it takes to reach this point is known as the integer's multiplicative persistence. For example, 347 has a persistence of 3: 3*4*7 = 84, 8*4 = 32, 3*2 = 6.
Devise a function that returns the persistence of an integer.
persistence(9) ➞ 0
persistence(12) ➞ 1
persistence(6788) ➞ 6
persistence(678852) ➞ 2