my_dict = {"A":1}
if not bool(my_dict):
print("Dictionary is empty")
else:
print("Not empty")
python判断字典是否为空
最新推荐文章于 2025-07-07 16:18:53 发布
my_dict = {"A":1}
if not bool(my_dict):
print("Dictionary is empty")
else:
print("Not empty")

被折叠的 条评论
为什么被折叠?
