Skip to content

Instantly share code, notes, and snippets.

@michelp
Created October 12, 2012 02:28
Show Gist options
  • Select an option

  • Save michelp/3876997 to your computer and use it in GitHub Desktop.

Select an option

Save michelp/3876997 to your computer and use it in GitHub Desktop.
>>> from itertools import starmap, product
>>> from operator import add
>>> list(starmap(add, product('ABC', '123')))
['A1', 'A2', 'A3', 'B1', 'B2', 'B3', 'C1', 'C2', 'C3']
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment