multiple replace
Project description
Install
[sudo] pip install replace
Functions
function | __doc__ |
---|---|
replace.replace(source, replacement) |
replace multiple elements/substrings and return result |
Examples
import replace
>>> replace.replace(["3.6","3.7","3.8"], {"3.7": "3.7-dev", "3.8": "3.8-dev"})
["3.6","3.7-dev","3.8-dev""3.8"]
>>> replace.replace("package/module.py", {"/": ".", ".py": ""})
"package.module"
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
replace-2019.3.8.tar.gz
(1.2 kB
view hashes)
Built Distribution
Close
Hashes for replace-2019.3.8-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 845123220897d7d8326fb6541ef5317d382bbe844121af30b387266f33add1ff |
|
MD5 | 4bf9338c354002a0bbb0d946fb5aeb3e |
|
BLAKE2b-256 | 3ec26627fa01e0596514f53a7ba6949e001e501cb1ef2dd4c2b0c8c8f900cbaf |