I found this code in CodeChef twitter https://twitter.com/codechef/status/941329495046459395 . It was written in C. I did it in Python3. Here is my code:
def vegas(a,b):
temp = a
a = b
b = temp
a = 6
b = 9
print(a,b)
vegas(a,b)
print(a,b)
And this is the answer:
6 9
6 9
My question is, why my 'vegas' function is not swapping the value of variable 'a' and 'b'