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