相关疑难解决方法(0)

Python不在字典条件语句中的表现

有人知道关于速度和资源使用什么更好的方法吗?链接到一些可信赖的来源将不胜感激。

if key not in dictionary.keys():
Run Code Online (Sandbox Code Playgroud)

要么

if not dictionary.get(key):
Run Code Online (Sandbox Code Playgroud)

python performance dictionary

1
推荐指数
1
解决办法
152
查看次数

标签 统计

dictionary ×1

performance ×1

python ×1