Processing Array Length In Python