How to convert a string into a list without including a specific character plus without using replace and split methods?
<p>Let's say you have:</p>

<pre><code>x = "1,2,13"
</code></pre>

<p>and you want to achieve:</p>

<pre><code>list = ["1","2","13"]
</code></pre>

<p>Can you do it without the split and replace methods?</p>

<p>What I have tried:</p>

<pre><code>list=[]
for number in x:
    if number != ",":
        list.append(number)

print(list) # ['1', '2', '1', '3']
</code></pre>

<p>but this works only if its a single digit</p>

<p>You could use a regular expression:</p>

<pre><code>&gt;&gt;&gt; import re
&gt;&gt;&gt; re.findall('(\d+)', '123,456')
['123', '456']
</code></pre>

python