Corrected the name of a variable and removed a debug print.

This commit is contained in:
The Wobbler 2024-01-05 22:30:21 +01:00
parent 16424d1f23
commit eaae218243

View file

@ -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))