LeetCode solutions

2977. Check if a String Is an Acronym of Words

My accepted Python solution to LeetCode problem 2977, Check if a String Is an Acronym of Words, running in 3ms.

  • Difficulty: Easy
  • Python
  • Runtime 3ms
  • Memory 17.3MB

Read the problem on LeetCode View on GitHub

Python

Accepted on LeetCode — runtime 3ms, memory 17.3MB, accepted 2026-01-01.

python
class Solution:
    def isAcronym(self, words: List[str], s: str) -> bool:
        return ''.join(word[0] for word in words) == s

Source