human
What is a code to interchanging first and second halves of strings and the other steps required given the following:
Interchanging first and second halves of strings | Function to concatenate two different halves of given strings.
Creating new strings by exchanging the first half of a and b . Please refer below for details of substr . https : www . geeksforgeeks . org / stdsubstr - in - ccpp /.
Driver function ;"
Solution in Python:
assistant
#Here is code to interchanging first and second halves of strings and the other steps required.
 def swapTwoHalves ( a , b ) :
	la = len ( a )
	lb = len ( b )
	c = a [ 0 : la // 2 ] + b [ lb // 2 : lb ]
	d = b [ 0 : lb // 2 ] + a [ la // 2 : la ]
	print ( c ,   " " , d )
a = " remuneration "
b = " day "
/ * Calling function * /
swapTwoHalves ( a , b )