yeonghwanjeon / coding_practice

0 stars 0 forks source link

[LeetCode]longest palindromic substring (고민중) #19

Open yeonghwanjeon opened 5 years ago

yeonghwanjeon commented 5 years ago

class Solution(object): def longestPalindrome(self, s): """ :type s: str :rtype: str """ original_s = copy.deepcopy(s) reverse_s = original_s[::-1] xor_s = []

    print(reverse_s)

    for i, c in enumerate(s) :
        if c == reverse_s[i] :
            is_match = 0
        else :
            is_match = 1
        xor_s.append(is_match)

    print(str(xor_s))

    for pos in xor_s :