Say you had the following
x = [[1,2,3], [4,5,6], [7,8,9]]
What's the best way, say in python or ruby, to print out all combinations of the inner elements?
So the result would look like:
147,
148,
149,
157,
158,
159,
167,
...
This would lead to a more universal way of solving typical interview type questions like 'print all letter combinations of a phone number' or 'print the bit chart of number x.'
Anyway, thoughts?