import itertools as IT

def evenly_spaced(*iterables):
    """
    >>> evenly_spaced(range(10), list('abc'))
    [0, 1, 'a', 2, 3, 4, 'b', 5, 6, 7, 'c', 8, 9]
    """
return [item[1] for item in sorted(IT.chain.from_iterable(zip(IT.count(
    start=1.0 / (len(seq) + 1), step=1.0 / (len(seq) + 1)), seq) for seq in
    iterables))]
iterables = [['X'] * 2, list(range(1, 11)), ['a'] * 3]
print(evenly_spaced(*iterables))
How to elegantly interleave two lists of uneven length in python?