Python While Loop Over Array Python Methods And Classes