https://github.com/andrewpetrochenkov/replace.py
:snake: multiple replace
https://github.com/andrewpetrochenkov/replace.py
python string
Last synced: 3 months ago
JSON representation
:snake: multiple replace
- Host: GitHub
- URL: https://github.com/andrewpetrochenkov/replace.py
- Owner: andrewpetrochenkov
- License: unlicense
- Created: 2019-03-08T20:29:27.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-03T21:21:27.000Z (over 4 years ago)
- Last Synced: 2025-02-26T09:42:00.778Z (3 months ago)
- Topics: python, string
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://pypi.org/project/replace/)
[](https://unlicense.org/)
[](https://github.com/andrewp-as-is/replace.py/actions)### Installation
```bash
$ [sudo] pip install replace
```#### Examples
```python
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"]
``````python
>>> replace.replace("package/module.py", {"/": ".", ".py": ""})
"package.module"
```