我目前正在使用以下功能来比较字典的值并显示所有不匹配的值。有没有更快或更好的方法来做到这一点?
match = True for keys in dict1: if dict1[keys] != dict2[keys]: match = False print(keys) print(dict1[keys], '->', dict2[keys])
编辑:两个字典都包含相同的键。
用户名或电子邮箱地址
密码