human
Reverse string without using any temporary variable | Function to reverse string and return reversed string.
Iterate loop upto start not equal to end.
XOR for swapping the variable.
Driver Code"
Solution in Python:
assistant
#Here is code to reverse string without using any temporary variable and the other steps required.
 def reversingString ( str , start , end ) :
	while ( start < end ) :
		str = ( str [ : start ] + chr ( ord ( str [ start ] ) ^ ord ( str [ end ] ) ) + str [ start + 1 : ] ) ;
		str = ( str [ : end ] + chr ( ord ( str [ start ] ) ^ ord ( str [ end ] ) ) + str [ end + 1 : ] ) ;
		str = ( str [ : start ] + chr ( ord ( str [ start ] ) ^ ord ( str [ end ] ) ) + str [ start + 1 : ] ) ;
		start += 1 ;
		end -= 1 ;
	return str ;
s = " GeeksforGeeks " ;
print ( reversingString ( s , 0 , 12 ) ) ;