This is my first time posting to Stackoverflow.
I'm trying to solve this problem here:
However, I'm not sure where this goes wrong - I checked line-by-line and couldn't see anything wrong. Could anyone help me fix this? Thank you!
CodePudding user response:
I see what is wrong - hailLen returns lenght of sequence and the question is about index for which the sequence is the longest. Just store it in variable
if (res := hailLen(i)) > counter: # it's python 3.8 syntax
counter = res
index = i
return index