我有一个列表推导式,它会返回列表
lst_fcflds
中不在列表RROPFields
中的元素:
nfld_rrop = [i for i in lst_fcflds if i not in RROPFields]
我希望添加一个过滤器,如果OBJECTID
或SHAPE
在lst_fclfds
中,则它们也不会被返回,就像这样:
nfld_rrop = [i for i in lst_fcflds if i not in RROPFields and i not in ["OBJECTID","SHAPE"]]