Corrected something.

This commit is contained in:
The Wobbler 2024-03-25 14:25:05 +01:00
parent 60271e4164
commit aed66009a3

View file

@ -132,7 +132,7 @@ def find_nth_occurrence(string: str, substring: str, n: int):
else: else:
rep = "b" * len(substring) rep = "b" * len(substring)
return string.replace(substring, rep, n - 1).find(substring) return string.replace(substring, rep, n).find(substring)
if __name__ == "__main__": if __name__ == "__main__":