dsaa60
dsaa60
Since we’ll be taking a look at quite a bit of experimental data in this text, we
have written a tkinter program that will read an XML file with the format given in
Listing 2.2 and plot the sequences to the screen. The PlotData.py program is given
in Sect. 22.4.
If we use the program to plot the data gathered by the list access experiment, we
see a graph like the one in Fig. 2.2. This graph provides the experimental data to back
up the two statements we made earlier about lists in Python. The red line shows the
average element access time of 1000 element accesses on a list of the given size. The
average access time (computed from a sample of 1000 random list accesses) is no
longer on a list of 10,000 than it is on a list of 160,000. While the exact values are not