Post

@clcoding Answer: 5
Solution: x is a list [1, 2, 3].
Now we run
print(x.pop(1) + x[1])
The expression inside print now evaluates as
x.pop(1)
this actually removes the item at index 1 in x (thus modifying x), AND returns it here.
Thus x.pop(1) evaluates to 2, and modifies x to [1, 3]
+
English

@clcoding At this time, x[1] is 3.
Thus, the value inside print simplifies to
2 (from the pop operation) + 3 (x[1] after the pop)
which works out to be 5.
And that's what gets printed.
English
