title: Python: Create a list of all four digits numbers with all different digits within it
body: <p>I was wondering if there is any easier way to achieve what this code is achieving. Now the code creates all 4-digits number in a list (if the number starts with a 0 is doesn't count as a 4-digit, for example 0123) and no digit is repeated within the number. So for example 1231 is not in the list. Preferable I want a code that does what this one is doing but a depending on what argument N is given to the function upon calling it creates this kind of list with all numbers with N digits. I hope this wasn't impossible to understand since Im new to programing. </p>
  
  <pre><code>def guessables():
     '''creates a list of all 4 digit numbers wherest every
      element has no repeating digits inside of that number+
      it doesn't count as a 4 digit number if it starts with a 0'''
       guesses=[]
       for a in range(1,10):
            for b in range(0,10):
                 if a!=b:
                    for c in range(0,10):
                        if b!=c and a!=c:
                            for d in range(0,10):
                                 if c!=d and d!=b and d!=a:
                                     guesses.append(str(a)+str(b)+str(c)+str(d))
      return guesses
  </code></pre>