Implementing Simple Java Array Example Code Python