human
First digit in product of an array of numbers | Python implementation to find first digit of a single number.
Keep dividing by 10 until it is greater than equal to 10.
driver function"
How can the above be solved in Python?
assistant
#Here is code to first digit in product of an array of numbers and the other steps required.
 def firstDigit ( x ) :
	while ( x >= 10 ) :
		x = x // 10
	return x
print ( firstDigit ( 12345 ) )
print ( firstDigit ( 5432 ) )