We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Time flies. Answered this 3 years ago just like yesterday...
About the unpack operator * in *product(a, b), please kindly refer to Expression lists|Python Documentation and it further refers to PEP 448 with clear examples.
For dictionary, the unpacker operator is ** instead.
Thanks for the great Python.
itertools.product()
You are viewing a single comment's thread. Return to all comments →
My Python 3 version:
Time flies. Answered this 3 years ago just like yesterday...
About the unpack operator
*
in*product(a, b)
, please kindly refer to Expression lists|Python Documentation and it further refers to PEP 448 with clear examples. For dictionary, the unpacker operator is**
instead. Thanks for the great Python.The list function for a and b is excessive. Ihor_L's version is simpler.