Skip to main content

tool to check sorting

Project description

is_sorted is a tiny tool to check if list (or other iterables) is sorted.


pip install is_sorted


>>> from is_sorted import is_sorted
>>> is_sorted([1, 2, 3, 4, 5, 6])
>>> is_sorted([1, 3, 2, 0])
>>> is_sorted([5, 4, 3, 2, 1], reverse=True)
>>> is_sorted([(1, 2), (2, 0), (3, 9), (4, 5)], key=lambda x: x[0])

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for is-sorted, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size is_sorted-0.0.1-py3-none-any.whl (2.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size is_sorted-0.0.1.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page