How To Do Two Pointer In Python While Loop