words and writes down the first letter of each word in a row.
Given a string code, return True if it is exactly the code made of the first letters of words in their order, and False otherwise.words=["keep", "it", "simple"], code="kis" → True
The first letters are k, i and s, which spell "kis".
words=["red", "orange"], code="ro" → True
The first letters r and o match the code.
words=["sun", "sea"], code="s" → False
The first letters give "ss", not "s": each letter of the code must match exactly one word.
len(words) ≤ 100len(words[i]) ≤ 20len(code) ≤ 100words[i] and code consist of lowercase English letterswords=["keep", "it", "simple"], code="kis"
True
Run checks the first 3 tests in your browser. Submit checks all 130 tests on the server, hidden ones included.