2108. Find First Palindromic String in the Array

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 2108

class Solution:
    def firstPalindrome(self, words: List[str]) -> str:
        return next((w for w in words if w == w[::-1]), "")