FDM Group Interview Question

Given variable A and B, how would you swap their values?

Interview Answer

Anonymous

Feb 6, 2021

Create a list with variable a and b inside. A with index 0, and b with index 1. Afterwards, assign element 0 in the list to variable B and element 1 in the list to variable A.