def bar(x, y=[]):
y.append(x)
return y
print(bar(7, [8, 9]))
Options:
Explanation
Correct answer is : A
When function is called here print(bar(7, [8, 9])), the x value will be 7 and y value will be [8, 9]. Then y.append(x) makes y to [8, 9, 7] and it returns from function and gets printed
Comment here: