human
Write me a code to write a function that returns 2 for input 1 and returns 1 for 2 and the other steps required given the following:
Write a function that returns 2 for input 1 and returns 1 for 2 |"
Solution in Python:
assistant
#Here is code to write a function that returns 2 for input 1 and returns 1 for 2 and the other steps required.
 def invert ( x ) :
	if ( x == 1 ) :
		return 2
		else :
		return 1