comefrom: <doocs>0005.Longest Palindromic Substring_1.py
code: def longestPalindrome( s: str) -> str:
      n = len(s)
      dp = [[False] * n for _ in range(n)]
      start, mx = 0, 1
      for j in range(n):
          for i in range(j + 1):
              if j - i < 2:
                  dp[i][j] = s[i] == s[j]
              else:
                  dp[i][j] = dp[i + 1][j - 1] and s[i] == s[j]
              if dp[i][j] and mx < j - i + 1:
                  start, mx = i, j - i + 1
      return s[start : start + mx]
masked: def sample_funcname ( var_0 : str ) -> str :
      var_1 = len ( var_0 )
      var_3 = [ [ False ] * var_1 for var_2 in range ( var_1 ) ]
      var_4 , var_5 = 0 , 1
      for var_6 in range ( var_1 ) :
          for var_7 in range ( var_6 + 1 ) :
              if var_6 - var_7 < 2 :
                  var_3 [ var_7 ] [ var_6 ] = var_0 [ var_7 ] == var_0 [ var_6 ]
              else :
                  var_3 [ var_7 ] [ var_6 ] = var_3 [ var_7 + 1 ] [ var_6 - 1 ] and var_0 [ var_7 ] == var_0 [ var_6 ]
              if var_3 [ var_7 ] [ var_6 ] and var_5 < var_6 - var_7 + 1 :
                  var_4 , var_5 = var_7 , var_6 - var_7 + 1
      return var_0 [ var_4 : var_4 + var_5 ]
  