Open kurtbrose opened 5 years ago
Here is a fairly simply way to accomplish what you desire:
list("".join(x) for x in itertools.product("ABC"', "123"))
You can also create a simply construct using map() to do the same
list(map(lambda x: ''.join(x),itertools.product('ABC', '123')))
@kurtbrose, when you say configurable type, are you looking for a version of product that can accept a transformation function?
@mahmoud , Should this be closed?
Hmm, @mblahay I'll probably leave it for the minute. I have a feeling @kurtbrose will come back one of these days with some clarification :)
find myself wanting to do
and get a result like
however, itertools always gives you back iterables of tuples