Answers for "python replace every space, dash and parentheses into underscore"

0

python replace every space, dash and parentheses into underscore

import re
def demicrosoft (fn):

    fn = re.sub('[()]', '', fn)
    for ch in [' ']:
        fn = fn.replace(ch,"_")
    return fn
Posted by: Guest on April-17-2022

Code answers related to "python replace every space, dash and parentheses into underscore"

Browse Popular Code Answers by Language