Corrected the name of a variable and removed a debug print.
This commit is contained in:
parent
16424d1f23
commit
eaae218243
1 changed files with 2 additions and 3 deletions
5
text.py
5
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))
|
||||
|
|
Loading…
Reference in a new issue