human
Find position of non | Function to find the count of placing non - attacking rooks on the N x N chessboard.
Count of the Non - attacking rooks.
Printing lexographically smallest configuration.
Driver Code.
Function call"
How can the above be solved in Python?

=====
Give me a code to find position of non and the other steps required?
assistant
#Here is code to find position of non and the other steps required.
 def findCountRooks ( row , col , n , k ) :
	res = n - k
	print ( res )
	ri = 0
	ci = 0
	while ( res > 0 ) :
		while ( ri < k and row [ ri ] == 1 ) :
			ri += 1
		while ( ci < k and col [ ci ] == 1 ) :
			ci += 1
		print ( ( ri + 1 ) , " " , ( ci + 1 ) )
		ri += 1
		ci += 1
		res -= 1
n = 4
k = 2
row = [ 1 , 2 ]
col = [ 4 , 2 ]
findCountRooks ( row , col , n , k )