python' list class the experiments of code fragment and at the beginning of section provide empirical evidence that python' list class is using form of dynamic arrays for its storage yeta careful examination of the intermediate array capacities (see exercises - and - suggests that python is not using pure geometric progressionnor is it using an arithmetic progression with that saidit is clear that python' implementation of the append method exhibits amortized constant-time behavior we can demonstrate this fact experimentally single append operation typically executes so quickly that it would be difficult for us to accurately measure the time elapsed at that granularityalthough we should notice some of the more expensive operations in which resize is performed we can get more accurate measure of the amortized cost per operation by performing series of append operations on an initially empty list and determining the average cost of each function to perform that experiment is given in code fragment from time import time import time function from time module def compute average( ) """perform appends to an empty list and return average time elapsed "" data start timerecord the start time (in seconds for in range( ) data append(none end timerecord the end time (in seconds return (end startn compute average per operation code fragment measuring the amortized cost of append for python' list class technicallythe time elapsed between the start and end includes the time to manage the iteration of the for loopin addition to the append calls the empirical results of the experimentfor increasingly large values of nare shown in table we see higher average cost for the smaller data setsperhaps in part due to the overhead of the loop range there is also natural variance in measuring the amortized cost in this waybecause of the impact of the final resize event relative to taken as wholethere seems clear evidence that the amortized time for each append is independent of ms , , , , , , , , , table average running time of appendmeasured in microsecondsas observed over sequence of callsstarting with an empty list