Your question is Swapping Without a Temp Variable. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
In a UiPath automation component, two integer configuration values are stored in variables x and y. Implement a function that swaps their values without using a third variable or creating a temporary container.
Use the XOR swap technique. The function must return the swapped values as a two-element tuple, with the new value of x first and the new value of y second.
x and y.(new_x, new_y) containing the original value of y followed by the original value of x.def swap_values(x, y):