Flipfloperator
This package implements the flip-flop operator in Python.
Install the package:
$ pip install flipfloperator
And then import the operator into your code:
from flipfloperator import ꓺ
Examples
Want to print out numbers between 1 to 20, but only after you reach 5 and stop when you reach 10?
>>> for i in range(1, 20 + 1):
... if ꓺ(i == 5, i == 10):
... print(i)
5
6
7
8
9
10
A handy text indenter:
>>> for line in '''
... zero indentation
... indent
... inside block
... dedent
... after the block
... indent
... another block
... dedent
... end of file
... '''.strip().split('\n'):
... if ꓺ(line.startswith('indent'), line.startswith('dedent')):
... print(' ' + line)
... else:
... print(line)
zero indentation
indent
inside block
dedent
after the block
indent
another block
dedent
end of file
And you too can find adorable cat nicknames in text:
>>> def bobo_nickname_finder(phrase):
... name = []
... phrase = phrase.replace('.', '').replace(',', '')
... for word in phrase.split():
... if ꓺ(word == 'Monsieur', word == 'Bobo'):
... name.append(word)
... return ' '.join(name)
>>> bobo_nickname_finder('''
... I have had a great day with this large boy, Monsieur Bobo.
... You may also know him as Monsieur 'Chonky' Bobo, or Monsieur
... 'Loves to Eat the Food' Bobo.
... ''')
"Monsieur Bobo Monsieur 'Chonky' Bobo Monsieur 'Loves to Eat the Food' Bobo"
Metadata
Release files for flipfloperator 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flipfloperator-0.1.2.tar.gz | 2.1 kB | Without provenance | Details for flipfloperator-0.1.2.tar.gz |
Release files / flipfloperator-0.1.2.tar.gz
| Download URL | flipfloperator-0.1.2.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3c901758185c5f2cbc5d6838a1475ef07f556909ddeac19a2dfce6854eb031c
|
|
BLAKE2b-256 checksum How to use checksums |
3790e8a285e56aa53dd03cf30f4a9928208374a386539b69e2326c8e6b82961b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.6
|
Security for flipfloperator 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.