我对Python和Coding比较陌生.我一直很好,直到遇到"无":
variable = None
while variable != "":
print("Why does this loop start?")
Run Code Online (Sandbox Code Playgroud)
虽然看起来很简单但我无法理解为什么上面的循环开始了.如何None
为空字符串不同?我以为他们都评价为False.