Lists in Python provide a means of storing multiple items in a single variable. In this tutorial we will be concatenating two lists, this means we will merge the contents of two lists in to one.
We will start by creating our lists and populating them with items.
FirstList = ['Harry', 'Jane', 'Will']
SecondList = ['Stevie', 'Robin', 'Dustin']
Looking at the above we have two lists, each of them containing three names. We will now move to merging the above in to one master list.
FirstList = ['Harry', 'Jane', 'Will']
SecondList = ['Stevie', 'Robin', 'Dustin']
MasterList = FirstList + SecondList
The output of the MasterList would give us the follwing.
>>>
['Harry', 'Jane', 'Will', 'Stevie', 'Robin', 'Dustin']