To concatenate the two lists, alst
and blst
, we can use the +
operator. The resulting list can be assigned to a new list, say clst
. The order of the operands in the expression blst + alst
is important, since it determines the order of elements in the resulting list.
Here is how we can perform the concatenation and the assignment in Python:
main.py67 chars7 lines
This will output: [4, 5, 6, 1, 2, 3]
gistlibby LogSnag