I have an issue where I have two options for each character in a n-char long string like so:
options1 = ['0','0','0','0']
options2 = ['1','1','1','1']
For simplicity I have used only '0'
or '1'
as options in this example and the string is only 4 characters long, but in my real problem the characters of the options are completely unique to the slot they belong in, and the strings can vary in size. How do I enumerate all possible versions of that string? i.e. I want the following output:
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1111