add python version of remove-nth-from-end-of-list