摘要: LIST 列表 1、判断列表是否为空 Python中判断list是否为空有以下两种方式: # way1 list_temp = [] if len(list_temp): # 存在值即为真,返回的是列表的元素个数; else: # list_temp是空的 # way2 list_temp = [] 阅读全文