Answers for "replace method regex true python"

21

python replace regex

import re
s = "Example String"
replaced = re.sub('[ES]', 'a', s)
print replaced 
# will print 'axample atring'
Posted by: Guest on March-13-2020

Python Answers by Framework

Browse Popular Code Answers by Language