How To Limit Array Length In Python