I have a program that needs to get all possible combinations of items in a list, but what I have found so far doesn't give me what I need. From a list of say [1,2,3]
I need the output,
(1)(2)(3)(1,1)(1,2)(1,3)(2,1)(2,2)(2,3)(3,1)(3,2)(3,3)
But all the solutions I've found give me an answer that doesn't repeat values, is there a library that can do this for me, because itertools doesn't give me the right output. Otherwise I'll just right a function myself.