[Solved] Reverse the list while creation
Well designed test shows that first function is slowest on Python 2.x (mostly because two lists have to be created, first one as a increasing range, second one as a reverted first one). I also included a demo using reversed. from __future__ import print_function import sys import timeit def iterate_through_list_1(arr): lala = None for i … Read more