How can i easily handle numberseries formated with brackets?
<p>I have a long list of numberseries formated like this:</p>

<pre><code>["4450[0-9]", "6148[0-9][0-9]"]
</code></pre>

<p>I want to make a list from one of those series with single numbers:</p>

<pre><code>[44500,44501,..., 44509]
</code></pre>

<p>i need to do this for many series within the original list and i'm wondering what the best way is for doing that?</p>

<p>Found this module which seems to do what i want.</p>

<p><a href="https://pypi.python.org/pypi/braceexpand/0.1.1" rel="nofollow">https://pypi.python.org/pypi/braceexpand/0.1.1</a></p>

<pre><code>&gt;&gt;&gt; from braceexpand import braceexpand
&gt;&gt;&gt; s = "1[0-2]"
&gt;&gt;&gt; ss = "1[0-2][0-9]"
&gt;&gt;&gt; list(braceexpand(s.replace("[", "{").replace("-","..").replace("]","}")))
['10', '11', '12']
&gt;&gt;&gt; list(braceexpand(ss.replace("[", "{").replace("-","..").replace("]","}")))
['100', '101', '102', '103', '104', '105', '106', '107', '108', '109', '110', '111', '112', '113', '114', '115', '116', '117', '118', '119', '120', '121', '122', '123', '124', '125', '126', '127', '128', '129']
</code></pre>

<p>alecxe's answer is still the "best" answer and not a shortcut tho</p>

python numbers series number-sequence