def str_prepend(s, char, n):
    """
        from xdict.utils import *
        str_prepend('a','s',3)
    """
    prepend = ''
    for i in range(1, n + 1):
        prepend = ''.join((prepend, char))
    return ''.join((prepend, s))
