Here is some code that I wrote using Python:
from math import sqrt abundant_list = [] for i in range(12,28123+1): dividor_list = [1] for j in range(
They take exact same time.
Here is the time taken for your code:
With dividor_list.extend([i/j,j])
dividor_list.extend([i/j,j])
>>> 0:00:00.410000 >>> 0:00:00.383000 >>> 0:00:00.389000
With dividor_list.append(i/j); dividor_list.append(j)
dividor_list.append(i/j); dividor_list.append(j)
>>> 0:00:00.400000 >>> 0:00:00.390000 >>> 0:00:00.381000