Word boundaries

Word boundaries

You are given a string (words) with some words separated by spaces and an integer (n) — index of a symbol in this string. You need to print the word (part of words, boundaried by spaces) that contains the symbol under this index. If no element matches this index, return None.

Note: Index is 0-based and refers to the position of a character in the string (including the space characters).

example

Input:
  • An integer "n" — index of a symbol in words.
  • A string "words" with some elements separated by spaces.
  • Output: A single line — element containing the symbol under this index.

    Examples:
    assert boundaries(2, "a b c") == "b"
    assert...
    You should be an authorized user in order to see the full description and start solving this mission.