Merge two arrays in python
In Python we use List in place of Array. The name is different but the functionality of List is like an Array in any other language.
To merge two arrays in python, you can use Concatenate Operator directly.
finalList = listA + listB
Full Example:
listA = ["A", "B", "C"]
listB = ["D", "E", "F"]
finalList = listA + listB
print(finalList)
Output:
['A', 'B', 'C', 'D', 'E', 'F']
Keywords: