computational complexity accessing elements in python list with experimentation we can verify that all locations within the ram of computer can be accessed in the same amount of time python list is collection of contiguous memory locations the word contiguous means that the memory locations of list are grouped together consecutively in ram if we want to verify that the ram of computer behaves like group of people all remembering their names and their valueswe can run some tests with python lists of different sizes to find the average time to retrieve from or store value into random element of the list to test the behavior of python lists we can write program that randomly stores and retrieves values in list we can test two different theories in this program the size of list does not affect the average access time in the list the average access time at any location within list is the sameregardless of its location within the list to test these two theorieswe'll need to time retrieval and storing of values within list thankfullypython includes datetime module that can be used to record the current time by subtracting two datetime objects we can compute the number of microseconds ( millionths of secondfor any operation within program the program in sect was written to test list access and record the access time for retrieving values and storing values in python list list access timing import datetime import random import time def main() write an xml file with the results file open("listaccesstiming xml"," " file write('\ ' file write('\ ' test lists of size to xmin xmax record the list sizes in xlist and the average access time within list that size in ylist for retrievals xlist [ylist [ for in range(xminxmax+ ) xlist append( prod this copy belongs to 'acha