diff --git a/text.py b/text.py index b4fc968..dca76fc 100644 --- a/text.py +++ b/text.py @@ -100,16 +100,15 @@ def asap(old: str, add: str, position: int): return old[:position] + add + old[position:] -def rsap(old: str, add: str, position: int): +def rsap(old: str, replace: str, position: int): """ RSAP = Replace String At Position (0 is the first character.) """ - return old[:position] + add + old[position + 1:] + return old[:position] + replace + old[position + 1:] if __name__ == "__main__": example() - print(rsap("bfa", "l", 1))