I'm trying to display all possible combinations of a list of numbers, for example if I have 334 I want to get:
3 3 4
3 4 3
4 3 3
I need to be able to do this for any set of digits up to about 12 digits long.
I'm sure its probably fairly simple using something like itertools.combinations but I can't quite get the syntax right.
TIA Sam