Typescript While Loop Continue Python