Help with Python combinations [Solved]
I'm trying to make a program that given 2 user inputs it will generate all the possible combinations based on that input. For example, 1st input is 6 and 2nd input is 2, the program will search all combinations, something like this 1,1,1,1,1,1 1,1,1,1,1,2 1,1,1,1,2,1 1,1,1,2,1,1 I've tried in some ways and with some examples of the internet, but all of them the output is like 1,2,2,2,2,2 doesn't do 1,2,1,1,1,1 2,3,3,3,3,3 doesn't do 2,1,1,1,1,1 and that is the main key for the problem So to short it, the game is about moving objects with a determine object that will make him move in certain direction, so the 1st input is how many movements it can do, and the 2nd input how many objects it has to allow movement. So the program will check all combinations it can do with the number of movements given by the game (0 to x) and with the objects also given by the game (0 to y) Any help is good, also if any suggestion how to speed it up and reduce the combinations is welcome Thanks in advance! 1024 char rechead.