Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # str_regex-like_replace.py -- easier to understand
- def repl(s):
- for c in list('#$!/:^?@')+['xyz']:
- s=s.replace(c,'')
- return s
- print repl("a#b$c@xyz1!2?3/4zzz:5^6xyz.pyx/y/z")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement