title: Rearrange words in a string based on which category set they belong to
body: <p>How would I rearrange a string based on what category it belongs to? Let's say I have these sets:</p>
  <pre><code>dogs = {'husky', 'chihuahua', 'labrador', 'beagle'} 
  flowers = {'dandelion', 'rose', 'tulip'} 
  colours = {'blue', 'yellow', 'green', 'red', 'pink'}
  </code></pre>
  <p>Then let's say I wanted to input a string and rearrange the words based on their category.</p>
  <pre><code>'husky tulip red orange'
  </code></pre>
  <p>would become</p>
  <pre><code>'red orange husky tulip'
  </code></pre>
  <p>The order would be colours first, then dogs, then flowers. Maybe create a list of the categories in order? Not too sure how I would go about this</p>