Skip to main content

No project description provided

Project description

python-slice

Install

Install slice-bin from PyPI, which will install slice as a command line tool.

pip install slice-bin

Usage

Assuming stdin is split on a newline and put into an array, the output can be filtered by Python's slice notation.

$ seq 10
1
2
3
4
5
6
7
8
9
10
$ seq 10 | slice 3
4
$ seq 10 | slice 3:
4
5
6
7
8
9
10
$ seq 10 | slice 3:5
4
5
$ seq 10 | slice -3:
8
9
10
$ seq 10 | slice :3
1
2
3
$ seq 10 | slice :-3
1
2
3
4
5
6
7
$ seq 10 | slice ::2
1
3
5
7
9
$ seq 10 | slice ::-2
10
8
6
4
2

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

slice_bin-0.1.1.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

slice_bin-0.1.1-py3-none-any.whl (7.1 kB view hashes)

Uploaded Python 3

Supported by

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