mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-21 21:27:36 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
fbd29773cb
commit
19db3e369f
@ -1,4 +1,6 @@
|
|||||||
def string_replace(text: str, input_string: str, replace_with_string: str, occurrence: int) -> str:
|
def string_replace(
|
||||||
|
text: str, input_string: str, replace_with_string: str, occurrence: int
|
||||||
|
) -> str:
|
||||||
"""
|
"""
|
||||||
The replace() method replaces a specified string with another specified string.
|
The replace() method replaces a specified string with another specified string.
|
||||||
The occurence parameter can be skipped in order to consider all text.
|
The occurence parameter can be skipped in order to consider all text.
|
||||||
@ -18,4 +20,5 @@ def string_replace(text: str, input_string: str, replace_with_string: str, occur
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
from doctest import testmod
|
from doctest import testmod
|
||||||
|
|
||||||
testmod()
|
testmod()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user