How To Collect The Row And Column Length Of An Array Python