How to substitute a certain letter in a certain location without substituting the other same letter? For example:
text = `"I need help. I need 5.4 dollar."`
I tried:
a = re.compile('\D(\.)')
print(a.sub('\n',text))
However, the output was
"I need hel\n I need 5.4 dolla\n"
How can I get the output of
"I need help\n I need 5.4 dollar\n"