Your question is Strings Swap Without Extra Space. 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.
A Backbase digital banking utility receives two string values that must be exchanged before further processing. Implement a function that swaps the values without declaring a third string or another named variable.
Python strings are immutable, so the solution must use Python's supported assignment semantics rather than attempting character-level mutation or arithmetic operations. The function should return the two values after swapping.
first and second.second followed by first.def swap_strings(first, second):