When I want to join a array
in PHP, I use the function array_merge
So:
$a = [1, 2, 3];
$b = [4, 5, 6];
array_merge($a, $b);
Result:
[1, 2, 3, 4, 5, 6]
And how could I do this in Python on a list
(I think a list
is equivalent to array
in PHP, if I'm not mistaken)?
Example:
a = [1, 2, 3]
b = [4, 5, 6];