How To Check Nested Array Length Python