import re

source = 'Young Aaron'

# ---結果一樣
print(source.replace('n','?'))

m = re.sub('n','?',source)
print(m)
# ----------
# 但re可以用正規表示法
m = re.sub('n.','?',source)
print(m)
c5c7f6db1352585da83e0c21fc0c249e152e2be6
<mask token>

<mask token>
print(source.replace('n', '?'))
<mask token>
print(m)
<mask token>
print(m)

<mask token>
source = 'Young Aaron'
print(source.replace('n', '?'))
m = re.sub('n', '?', source)
print(m)
m = re.sub('n.', '?', source)
print(m)

import re
source = 'Young Aaron'
print(source.replace('n', '?'))
m = re.sub('n', '?', source)
print(m)
m = re.sub('n.', '?', source)
print(m)

import re

source = 'Young Aaron'

# ---結果一樣
print(source.replace('n','?'))

m = re.sub('n','?',source)
print(m)
# ----------
# 但re可以用正規表示法
m = re.sub('n.','?',source)
print(m)