P934A1N2 says to YSITD
>>> text = "test 1234" >>> re.sub(r"[\d]", "g", text) 'test gggg'