Hello mentor, and I checked my code again carefully and yeah, as you said, it was my mistake . I was careless and didn’t find this error at first. I found the wrong part and changed that line like this:
the error fixed. Thank you mentor for your kind help!
PS: This is the reference of the wrong answer link, who got the same wrong testing value as mine.