Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Range Utilities

This Python script provides two utility functions for working with number ranges:

  1. expand_ranges: Converts a list of range strings into a list of individual numbers.
  2. collapse_ranges: Converts a list of individual numbers into a list of range strings.

Installation

No installation is required. Simply download the range_utils.py file and import it into your Python project.

Usage

Importing the Functions

To use the functions, import them from the range_utils.py file:

from range_utils import expand_ranges, collapse_ranges

About

A collection of Python utilities for expanding and collapsing number ranges. Easily convert between lists of individual numbers and formatted range strings. Ideal for working with sequential data, generating ranges, or simplifying number lists.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages