我有一个简单的Python代码示例
import json
hello = json.dumps("hello")
print(type(hello))
if hello == "hello":
print("They are equal")
else:
print("They are not equal")
这是在判断"他们不平等".我不明白为什么这些值不相等.
我正在熟悉Python,但我读到这个"=="可以用作比较Python中字符串的operator.我还打印了hello的类型,其计算结果为"str"
有人能澄清一下吗?