From eaae2182430a72d162ac8c19f88b43c132570217 Mon Sep 17 00:00:00 2001 From: EKNr1 Date: Fri, 5 Jan 2024 22:30:21 +0100 Subject: [PATCH] Corrected the name of a variable and removed a debug print. --- text.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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))