This should do what you require.
import os
import sys
import argparse
parser = argparse.ArgumentParser(description='Rename files by replacing all instances of a character from filename')
parser.add_argument('--dir', help='Target DIR containing files to rename', required=True)
parser.add_argument('--value', help='Value to search for an replace', required=True)
args = vars(parser.parse_args())
def rename(target_dir, rep_value):
    try:
        for root, dirs, files in os.walk(target_dir):
            for filename in files:
                if rep_value in filename:
                    filename_new = str(filename).replace(rep_value, '')
                    os.rename(os.path.join(root, filename), os.path.join(root, filename_new))
                    print '{} renamed to {}'.format(filename, os.path.join(root, filename_new))
    except Exception,e:
        print e
target_dir = args['dir']
rep_value = args['value']
rename(target_dir, rep_value)
Example usage:
rename.py --dir /root/Python/ --value ?
Output
?test.txt renamed to /root/Python/test.txt
?test21.txt renamed to /root/Python/test21.txt
test1?.txt renamed to /root/Python/test1.txt