一行代码python
不含有888的返回
list_str = ["11_888_12", "11_888_2", "11_777_12"]
bb = [x for x in list_str if '888' not in x]
list_str = ["11_888_12", "11_888_2", "11_777_12"]
list_str_np = np.array(list_str)
aa = list_str_np[list(map(lambda x: "888" not in x, list_str_np))]
好记性不如烂键盘---点滴、积累、进步!