Reverse engineering and stuff. Just personal notes.
Saturday, May 3, 2014
Efficient looping in Python
Nested loop: for elem in names: for elem2 in names: for elem3 in names: name = elem+elem2+elem3 Using itertools: for elem, elem2, elem3 in itertools.product(names, repeat=3) name = elem+elem2+elem3
No comments:
Post a Comment