python之将元组中的None值去掉

# 将元组中的None值去掉,并转换为list
input_= [('接口自动化测试用例', None, None, None, None, None, None)]
output = []
for each in input_:
    newList = list(filter(None,each))
    output += newList
print(output)

 

posted @ 2022-03-09 17:40  博无止境  阅读(382)  评论(0编辑  收藏  举报