human
Print prime factors of a given integer in decreasing order using Stack | Function to print prime factors of N in decreasing order.
Stores prime factors of N in decreasing order.
Insert i into stack.
Update N.
Update i.
Print value of stack st.
Driver Code.
function Call"
How can the above be solved in Python?

Give me a code to print prime factors of a given integer in decreasing order using Stack and the other steps required?
assistant
#Here is code to print prime factors of a given integer in decreasing order using Stack and the other steps required.
 def PrimeFactors ( N ) :
	st = [ ]
	i = 2
	while ( N != 1 ) :
		if ( N % i == 0 ) :
			st . append ( i )
			while ( N % i == 0 ) :
				N = N // i
		i += 1
	while ( len ( st ) != 0 ) :
		print ( st [ - 1 ] )
		st . pop ( )
if __name__ == " _ _ main _ _ " :
	N = 8
	PrimeFactors ( N )