guys let me ask stupid question. Below code is giving me error "local variable 'palLen' referenced before assignment".
```
def longestPalindrome(s: str) -> str:
n = len(s)
palLen = 0
longestPalR = -1
longestPalL = -1
def checkPal(l,r, curPalLen):
while -1<l and r<n and s[l] == s[r]:
curPalLen += 2
if curPalLen > palLen:
palLen = curPalLen
longestPalR = r
longestPalL = l
l-=1
r+=1
for i in range (0, n):
checkPal(i,i, 1)
checkPal(i,i+1, 0)
return s[longestPalR, longestPalL+1]
longestPalindrome("babad")