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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for is_sorted-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92de089d31f54967d1847f11ac3fe25d9673d6b150ca6940d83f43cd54fffe4b |
|
MD5 | 9c01045a620ea1d3912325985bc52712 |
|
BLAKE2b-256 | 454b97dc5ccdeb26c05b0a43ff3c385874998933afd3d7670f9e3f2dd4528130 |