Python determines whether strings are equal?
女神的闺蜜爱上我
女神的闺蜜爱上我 2017-06-30 09:54:18
0
3
1042


#Aren’t word and key equal? Why not perform the print operation and jump directly to the superposition of i?

女神的闺蜜爱上我
女神的闺蜜爱上我

reply all(3)
代言

You can’t tell the reason just by taking screenshots of these contents.
You can add a print in else, firstly to see if else is entered, but also to see what the word and key are.

習慣沉默

What you see in the debuger of IDE may not be the real values. You can print out their type and have a look.
You will find that debuger can sometimes lie.
Also, you can look at the difference between __str__ and __repr__ and understand obj==eval(repr(obj)).
Here’s a great answer: Difference between str and repr in Python

曾经蜡笔没有小新

Just use == to judge. . .

Print it out to see if there are any encoding problems in the local and Linux environments. After pasting down the code, do you want us to type it again by hand? . .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!