title: Replace numbers with Roman numerals
body: <p>I need a way to replace all occurrences of numbers represented as digits within a string with their Roman numeral equivalents.</p>
  
  <p>Examples: </p>
  
  <ul>
  <li><code>My 3 Top Tips: Part 19</code> should output <code>My III Top Tips: Part XIX</code></li>
  <li><code>Se7en</code> should output <code>Se7en</code> (since the character <code>7</code> is not a 'word')</li>
  </ul>
  
  <p>It seems the best package out there for the job is <a href="https://pypi.python.org/pypi/roman" rel="nofollow">roman</a>.  Unfortunately it won't accept strings containing both text and numbers.</p>
  
  <p>My thoughts are:</p>
  
  <ol>
  <li><code>split()</code> the text</li>
  <li>iterate each <code>word</code></li>
  <li>is <code>word</code> a number, if so replace it using <code>roman</code></li>
  <li>merge the list together again</li>
  </ol>
  
  <p>This just seems messy and error prone, and not very pythonic.  What are the better ways to do this?  Is it possible with a regex or list comprehension, or a combination of both?</p>