def common_prefix(iterables):
    iterables = iter(iterables)
    try:
        prefix = iterables.next()
    except StopIteration:
        raise ValueError("at least one iterable is required")
    for item in iterables:
        count = 0
        for (c1,c2) in itertools.izip(prefix,item):
            if c1 != c2:
                break
            count += 1
        prefix = prefix[:count]
    return prefix
Returns the stem of the given word: ponies => poni.
dataset/ETHPy150Open cloudmatrix/esky/esky/util.py/common_prefix--crossover with--dataset/ETHPy150Open clips/pattern/pattern/vector/stemmer.py/stem