def sift(k, a):
    "Remove multiples of k from list a"
    for i in range(2*k, len(a), k):
        a[i] = None
