Java While Loop Through An Array Python