def append_position(path, position, separator=''):
 (filename, extension) = os.path.splitext(path)
 return ''.join([filename, separator, str(position), extension])

def append_position ( path , position , separator = '' ) : ( filename , extension ) = os . path . splitext ( path ) return '' . join ( [ filename , separator , str ( position ) , extension ] )
concatenate a path and a position .