It will measure the execution time of everything in the instruction (the first arg), so if you only need to measure the call to A0, then creating a list will distort the results.
Try creating a list in customization:
timeit.timeit("A0(aList)", setup="from HW2 import A0; aList = [randint(1,256) * (-1) ** randint(1,2) for j in range("+str(n)+")] ", number=1000000)
The list will be created only once, at the beginning of the timer and will not be included in the selection.
source share