class Solution:
def lengthOfLongestSubstring(self, s: str,unique=[]) -> int:
i=0
m=0
j=0
l=0
while(i<len(s)):
if(s[i] not in unique):
unique.append(s[i])
m=m+1
l = max(l,m)
i=i+1
else:
unique=[]
j=j+1
i=j
m=0
print(l)
return
Input = "c" output = "1" during runcode but fails(0) on submit. It also works during the playground debug for the same testcase. unable to figure it out.