开发者社区> 问答> 正文

python怎么判断字典为空

python怎么判断字典为空

展开
收起
云计算小粉 2018-05-10 20:10:08 4719 0
3 条回答
写回答
取消 提交回答
  • image.png

    2019-11-14 10:16:50
    赞同 展开评论 打赏
  • MaxCompute 生态
    a = dict() if not a: print("not empty)
    2019-07-17 22:20:12
    赞同 展开评论 打赏
  • >>> a = dict() >>> if not a: ... print('The dictionary is empty') ... The dictionary is empty
    2019-07-17 22:20:12
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
Data Pre-Processing in Python: 立即下载
双剑合璧-Python和大数据计算平台的结合 立即下载