title: Print n-length combinations without repetitions using recursion
body: <p>Further to this problem: <a href="https://stackoverflow.com/questions/53561500/print-n-length-combinations-from-char-list-using-recursion-python/53561602?noredirect=1#comment94008908_53561602">Print n-length combinations from char list using recursion</a></p>
  
  <p>Now I have to implement the same algorithm with some another twist: without repetitions of some char.</p>
  
  <blockquote>
    <p>Implement a function in Python which recieves as parameters list of characters and an integer n. The function has to print all the possible combinations in the length of n, where every character can be shown only one time.</p>
  </blockquote>
  
  <p>So, as I am a beginner and bad in recursion, I don't succeed to think of an elegant solution to solve that.</p>
  
  <p>I have thought to use the same code from the previous problem:</p>
  
  <pre><code>def print_sequences(char_list, n, _accum=[]):
    if len(_accum) == n:
      print(_accum)
    else:
      for c in char_list:
        print_sequences(char_list, n, _accum+[c])
  </code></pre>
  
  <p>And simply build a new function (return_without_repetition) that takes a list and goes over it, builds a new list without repetitions. Such that when I print the list I use the function:</p>
  
  <pre><code>if len(_accum) == n:
      print(return_without_repetition(_accum))
  </code></pre>
  
  <p>But it's very not effective and not elegant.</p>
  
  <p>Maybe there is another way to solve it by defining new lists in the body of the recursion but I got lost concerning the scoping and the suitable places to define the lists...</p>