fork download
  1. import re
  2.  
  3. regex = r"\s\.(?=[a-zA-Z])"
  4. result = re.sub(regex, ". ", "My friend is hungry .I am happy")
  5.  
  6. if result:
  7. print (result)
Success #stdin #stdout 0.02s 27712KB
stdin
Standard input is empty
stdout
My friend is hungry. I am happy