removes all chars in repl from string
(string, repl)
| 26 | |
| 27 | |
| 28 | def remove_chars(string, repl): |
| 29 | """ removes all chars in repl from string""" |
| 30 | if type(string) == str: |
| 31 | return string.translate(maketrans("", ""), repl) |
| 32 | elif type(string) == unicode: |
| 33 | return string.translate(dict([(ord(s), None) for s in repl])) |
| 34 | |
| 35 | |
| 36 | def save_path(name): |