title: How to map word combinations in python
body: <p>Lets say I have a 2 word combination:</p>
  
  <pre><code>two flowers
  </code></pre>
  
  <p>I want to map possible combinations of these words programatically.  I have the following pseudocode combinations:</p>
  
  <pre><code>{fw}{lw}  (firstword, last word)
  {fw} {lw}  (firstword, space, last word)
  ......
  </code></pre>
  
  <p>What is the best way in python to build up a shorthand notation like above, what data structure should it be stored in, and finally how would one map:</p>
  
  <pre><code> two flowers x [{fw}{lw},{fw} {lw}] -&gt; ['twoflowers','two flowers'] etc
  </code></pre>
  
  <p>I'm sorry this is kind of an open ended question. I'm pretty new to python and not sure how to approach this problem, so any advice would be appreciated. I put square brackets around the structures even though lists may not be the best data structure to use here.</p>