Unexpected Behavior of Extend with a list in Python
Unexpected Behavior of Extend with a list in Python Question: I am trying to understand how extend works in Python and it is not quite doing what I would expect. For instance: >>> a = [1, 2, 3] >>> b = [4, 5, 6].extend(a) >>> b >>> But I would have expected: [4, 5, 6, …