Delphi String Replace Function In Python