the pylist datatype in the first couple of we began developing our pylist data structure to support the ( complexity of the append operationthe pylist contains empty locations that can be filled when append is called as first described in sect we'll keep track of the number of locations being used and the actual size of the internal list in our pylist objects sowe'll need three pieces of informationthe list itself called itemsthe size of the internal list called sizeand the number of locations in the internal list that are currently being used called numitems while we wouldn' have to keep track of the size of the listbecause we could call the len functionwe'll store the size in the object to avoid the overhead of calling len in multiple places in the code all the used locations in the internal list will occur at the beginning of the list in other wordsthere will be no holes in the middle of list that we will have to worry about we'll call this assumption an invariant on our data structure an invariant is something that is true before and after any method call on the data structure the invariant for this list is that the internal list will have the first numitems filled with no holes the code in sect provides constructor that can also be passed list for its initial contents storing all the items at the beginning of the listwithout holesalso means that we can randomly access elements of the list in ( time we don' have to search for the proper location of an element indexing into the pylist will simply index into the internal items list to find the proper element as seen in the next sections the pylist constructor class pylistdef __init__(self,contents=[]size= )the contents allows the programmer to construct list with the initial contents of this value the initial_size lets the programmer pick size for the internal size of the list this is useful if the programmer knows he/she is going to add specific number of items right away to the list self items [nonesize self numitems self size size for in contentsself append(ethe code in sect builds pylist object by creating list of none values none is the special value in python for references that point at nothing figure shows sample list after it was created and three items were appended to it the special none value is indicated in the figure by the three horizontal lines where the empty slots in the list point the initial size of the internal items list is by defaultbut user could pass larger size initially if they wanted to this is only the initial size the list will still grow when it needs to the contents parameter lets this copy belongs to 'acha