human
Check if a Rook can reach the given destination in a single move | Function to check if it is possible to reach destination in a single move by a rook.
Given arrays"
How can the above be solved in Python?
assistant
#Here is code to check if a Rook can reach the given destination in a single move and the other steps required.
 def check ( current_row , current_col , destination_row , destination_col ) :
	if ( current_row == destination_row ) :
		return ( " POSSIBLE " )
	elif ( current_col == destination_col ) :
		return ( " POSSIBLE " )
	else :
		return ( " NOT ▁ POSSIBLE " )
current_row = 8
current_col = 8
destination_row = 8
destination_col = 4
output = check ( current_row , current_col , destination_row , destination_col )
print ( output )