Skip to content

And2Ex/rangify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

House Number Rangifier

Description

This Python script processes sequences of numbers (specifically, a list of houses) by converting them into ranges, removing duplicates, and sorts values. It's adaptable to different formats, including the Ukrainian convention of using 'Буд' (short for 'Будинок', meaning 'Building' in Ukrainian) at the beginning of strings. Users can replace 'Буд' with their own term if needed or leave it unused.

Usage

  1. Run the script.
  2. Enter the input string. You can use 'Enter' for a test string, 'q' to exit, or 'i' for info.
  3. Optionally, choose to delete slashes and numbers after them by entering '/'.
  4. The script will display the formatted output string.

Example

Input string: 1,2,2B,3,5,4,6,9,10-12-15,22,55,77,78,1,3,21,24,23,26,27.28,5/74

Output string: 1-6,9-15,21-24,26-28,55,77-78,2B,5/74

About

This script transforms a sequence of numbers (such as house numbers) into ranges, removing duplicates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages