📜  根据条件拆分列表 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:02.338000             🧑  作者: Mango

代码示例2
good = [x for x in mylist if x in goodvals]
bad  = [x for x in mylist if x not in goodvals]