>>> timeit.timeit('list(itertools.product([1,2,3,4],["a","b","c","d"]))',number=100)
0.00015309499997329112
>>> timeit.timeit('[(x,y) for i,x in enumerate([1,2,3,4]) for j,y in enumerate(["a","b","c","d"])]',number=100)
0.00034536499998694126
>>>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment