1

I am using itertools to do cartesian products of list of lists.

list of lists :-

[['who','what'],['is','in'],['age','ago']]

Piece of Code:-

from itertools import product
[' '.join(p) for p in product(*temp_suggest_lst)]

I am using this itertools to do cartesian product. Sometimes my each list contains 100000 of values/string then itertools might be slow down.

Is there any tools which build cartesian product very very fast or itertools is the best?

iNikkz
  • 3,729
  • 5
  • 29
  • 59
  • possible duplicate of [itertools product speed up](http://stackoverflow.com/questions/4709510/itertools-product-speed-up) – Mazdak Feb 25 '15 at 16:29
  • @KasraAD : I am not using numpy. I have simple list in python. – iNikkz Feb 26 '15 at 05:57

0 Answers0