String manipulation in Python
<p>I have a <strong>randomly</strong> generated string from 6 letters in this form, example:</p>

<pre><code>A' B F2 E' B2 A2 C' D2 C D' E2 F
</code></pre>

<p>Some letters have " ' " added to them some have number "2". What i want is to add letter "x" to every letter that is on its own.</p>

<p>So it would look like this: </p>

<pre><code>A' Bx F2 E' B2 A2 C' D2 Cx D' E2 Fx
</code></pre>

<p>The trick is that it would add the "x" only to those letters that are on their own. No, Bx -> Bx2.</p>

<p>Any ideas?</p>
