Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

This function was created as part of a codewars challenge and I thought it may be of use in
various applcations. 

The function takes a ordered list of numbers eg:
[-6, -3, -2, -1, 0, 1, 3, 4, 5, 7, 8, 9, 10, 11, 14, 15, 17, 18, 19, 20]


and returns the range:
 "-6,-3-1,3-5,7-11,14,15,17-20"
 
 If the data that is being received is not ordered, simply use Python's sorted() or .sort()

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages