Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Word boundaries by ssk8
def boundaries(n: int, words: str) -> str:
if not (n > len(words) or words[n] == " "):
words = " " + words + " "
sl = words.find(" ", n + 1)
return words[words[:sl].rfind(" ") + 1 : sl]
Feb. 27, 2024
Comments: