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
- Updated
Read the problem on LeetCode View on GitHub
The problem statement is LeetCode’s and stays on their site. What follows is my accepted solution.
Python
Accepted on LeetCode — runtime 3ms, memory 17.3MB, accepted 2026-01-01.
class Solution:
def isAcronym(self, words: List[str], s: str) -> bool:
return ''.join(word[0] for word in words) == s