組み込み関数を使用せずに簡単なPython文字列置換


友達がPythonの文字列置換関数でPythonを複製できるかどうか尋ねました.
もちろん頑丈ではないけど、試してみるべきだと思った.
以下は私のテイクです.
これを改善するどんな考えでも、歓迎です.
def replace(strng, substr, rplstr): 
    if substr not in strng:
        return strng

    low_index = strng.find(substr) # get lowest index of substring
    high_index = low_index + len(substr) # evaluate the highest index of substring

    return replace(strng[:low_index]+ rplstr + strng[high_index:], substr, rplstr) 


出力
print(replace("Hello World Hello World", "llo", "@@"))
He@@ World He@@ World