def repeat_flag(seq, flag):
    """Intersperse flag as a predecessor to each element of seq.

    Example:
    seq = ['foo', 'bar', 'bas']
    flag = '--word'
    print repeat_flag(seq, flag)
      ==>  ['--word', 'foo', '--word', 'bar', '--word', 'bas']
    """
    for item in iter(seq):
        yield flag
        yield item
