Find First Palindromic String in the Array LeetCode solution in Python

1
class Solution:
2
def firstPalindrome(self, words):
3
for word in words:
4
if word == word[::-1]:
5
return word
6
return ""

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0