Q. What will the following code print?
Code:
x = [1, 2, 3] x.append([4, 5]) print(len(x))
β
Correct Answer: (B)
4
Explanation: `append()` adds the whole list as a single element, so length becomes 4.