def foo(x):
x += [5]
d = [1, 2, 3, 4]
foo(d)
print(len(d))
Options:
Explanation
Correct answer is : B
The arguments are passed to function as reference Any change to mutable type of object inside function will change the object. So "d" will become [1, 2, 3, 4, 5] and len(d) will print "5"
Comment here: