I need a code that would run through the possible combinations of 4 numbers e.g 1234 would produce 24 combinations of 1234, 1243, 1324 ... ect ect. But does not do ['1', '12', '123', ect] I want it to be only 4 number length combinations, (just changing the order)
A long option would be to
import random
randomise one of the 4 numbers, randomise another and another and another, check if that combination had been printed or like added to an array that held the possible combinations and then eventually printed out all of them.
array = ['1234', '1243', '1342', '1324' ect]
That would take long though and is highly inefficient.
Pretty new to coding :)
Thanks