Skip to main content

Useless library if you have time for puzzles, a useful one if you don't

Project description

utilless

Useless library if you have time for puzzles, a useful one if you don't

Quickstart

Install using pip: pip install utilless
and import package into your script, v.g.
from utilless.comma import commaspace print(commaspace(['Hello', 'world!']))

Module comma

Manipulates iterables and gets results with commas

iterable: any element that has __ iter __ method, like list, tuple, set, dict or even str.

  • justcomma(iterable)

>>> justcomma(['apples', 'bananas', 'tofu', 'cats'])
'apples,bananas,tofu,cats'

  • commaspace(iterable)

>>> commaspace(['apples', 'bananas', 'tofu', 'cats'])
'apples, bananas, tofu, cats'

  • commaand(iterable)

>>> commaand(['apples', 'bananas', 'tofu', 'cats'])
'apples, bananas, tofu, and cats'

or commaand(iterable, str)
>>> commaand(['apples', 'bananas', 'tofu', 'cats'], ' & ')
'apples, bananas, tofu & cats'

Module dot

Manipulates iterables and gets results with dots

  • justdot(iterable)

>>> justdot(['apples', 'bananas', 'tofu', 'cats'])
'apples,bananas,tofu,cats'

Module iseven

Infamous function. Learn how to use modulo (%)

  • iseven(int)

>>> iseven(1)
False >>> iseven(42)
True

Module isodd

See module iseven

  • isodd(int)

>>> isodd(1)
True >>> isodd(42)
False

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

utilless-0.2.0.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

utilless-0.2.0-py3-none-any.whl (10.7 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