title: Generating all possible combinations of characters in a string
body: <p>Say I have a string list:</p>
  
  <pre><code>li = ['a', 'b', 'c']
  </code></pre>
  
  <p>I would like to construct a new list such that each entry of the new list is a concatenation of a selection of 3 entries in the original list. Note that each entry can be chosen repeatedly:</p>
  
  <pre><code>new_li=['abc', 'acb', 'bac', 'bca', 'cab', 'cba', 'aab', 'aac',....'aaa', 'bbb', 'ccc']
  </code></pre>
  
  <p>The brutal force way is to construct a 3-fold nested for loop and insert each 3-combination into the new list. I was wondering if there is any Pythonic way to deal with that? Thanks.</p>
  
  <p>Update:
  Later I will convert the new list into a set, so the order does not matter anyway.</p>