Oct-09-2017, 03:28 PM
Replacing using_chain with:
def using_chain(): one = range(1, 1000000) two = range(1, 1000000) three = list(chain(one, two, one, two, one, two))gets you:
Output:repeat 10
using concatenation --> 1.96962308884
using extend --> 1.10849690437
using chain --> 1.07177019119
So it works if you are trying to get something to iterate over, but not if you want something you can manipulate as a list.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures