

def append_position(path, position, separator=''):
    '\n    Concatenate a path and a position,\n    between the filename and the extension.\n    '
    (filename, extension) = os.path.splitext(path)
    return ''.join([filename, separator, str(position), extension])

dataset/ETHPy150Open Fantomas42/django-blog-zinnia/zinnia/templates.py append_position/original