While Validation Loop Python Array Indexing