good, bad = [], []
for x in mylist:
(bad, good)[x in goodvals].append(x)
# good.append(x) if x in goodvals else bad.append(x)
# for x in mylist: (good if isgood(x) else bad).append(x)
# (good if x in goodvals else bad).append(x)
good = [x for x in mylist if x in goodvals]
bad = [x for x in mylist if x not in goodvals]