Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- replacers = [
- ("test", "wow"),
- ("ayy", "lmao"),
- ("replace","withthis"),
- ("20", "40")
- ]
- string = "test ayy replace 20"
- for i in replacers: string = string.replace(*i)
- #>>> string
- #'wow lmao withthis 40'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement