Is it possible to convert this function, list comprehension combination into a single list comprehension (so that keep
is not needed)?
def keep(list, i, big):
for small in list[i+1:]:
if 0 == big % small:
return False
return True
multiples[:] = [n for i,n in enumerate(multiples) if keep(multiples, i, n)]