Replace Single Quotes and Comma in Nested List : <p>Have a list of list that looks like this:</p>

<pre><code>mylist = [['A'],['A', 'B'], ['A', 'B', 'C']]
</code></pre>

<p>Need to remove and replace all ', ' instances with a comma only (no spaces). Output should look like this:</p>

<pre><code>mynewlist = [['A'],['A,B'], ['A,B,C']]
</code></pre>

<p>Tried the following:</p>

<pre><code>mynewlist = [[x.replace("', ''",",") for x in i] for i in mylist]
</code></pre>

<p>This works on other characters within the nested lists (e.g. replacing 'A' with 'D', but does not function for the purpose described above (something to do with with the commas not being literal strings?).</p>
