I have a long list of numberseries formated like this:
["4450[0-9]", "6148[0-9][0-9]"]
I want to make a list from one of those series with single numbers:
[44500,44501,..., 44509]
i need to do this for many series within the original list and i'm wondering what the best way is for doing that?
Probably not the best solution, but you can approach it recursively looking for the
[x-y]ranges and generating values (usingyieldandyield fromin this case, hence for Python 3.3+):Prints: