Top-rated recipes tagged "hypen"http://code.activestate.com/recipes/tags/hypen/top/2010-07-01T02:08:09-07:00ActiveState Code RecipesGenerate List of Numbers from Hyphenated and comma separeted string like "1-5,25-30,4,5" (Python) 2010-07-01T02:08:09-07:00Siddhant Sanyamhttp://code.activestate.com/recipes/users/4174317/http://code.activestate.com/recipes/577279-generate-list-of-numbers-from-hyphenated-and-comma/ <p style="color: grey"> Python recipe 577279 by <a href="/recipes/users/4174317/">Siddhant Sanyam</a> (<a href="/recipes/tags/hypen/">hypen</a>, <a href="/recipes/tags/list/">list</a>, <a href="/recipes/tags/range/">range</a>). </p> <p>This function takes a range in form of "a-b" and generate a list of numbers between a and b inclusive. Also accepts comma separated ranges like "a-b,c-d,f" will build a list which will include numbers from a to b, a to d and f Example: hyphen_range('54-78') hyphen_range('57-78,454,45,1-10') hyphen_range('94-100,1052,2-50')</p>