add find insert position python version