Python While Loop With Try Except C