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.

Installation

pip install is_sorted

Examples

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

Project details


Download files

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

Source Distribution

is_sorted-0.0.1.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

is_sorted-0.0.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file is_sorted-0.0.1.tar.gz.

File metadata

  • Download URL: is_sorted-0.0.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for is_sorted-0.0.1.tar.gz
Algorithm Hash digest
SHA256 37977b055b47edfbf8a922119d2d3242c0f182895efa26393dfa1fb229824352
MD5 318b0f083567045349acc64fb389ec66
BLAKE2b-256 c9cf982713fbcca4083f5d41f887e7a5a489823ce749ce9919f18c0e5a4afd76

See more details on using hashes here.

File details

Details for the file is_sorted-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: is_sorted-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for is_sorted-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 92de089d31f54967d1847f11ac3fe25d9673d6b150ca6940d83f43cd54fffe4b
MD5 9c01045a620ea1d3912325985bc52712
BLAKE2b-256 454b97dc5ccdeb26c05b0a43ff3c385874998933afd3d7670f9e3f2dd4528130

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page