-2
我想找到给定的双数组中的子数的数量。如何计算python中的给定数组中的子数组?
例如,
Input: aaa=[[4,3,1],[3,1,1,1,3],[-1,-2,3],[4]]
Output: number(aaa) = 4
或
Input: bbb=[[4,3,1],[],[3,1,1,1,3],[-1,-2,3],[4]]
Output: number(bbb) = 4
你能帮助我吗?
在最后一个例子中'number(bbb)= 4'是什么? – RomanPerekhrest
我认为你的最后输出必须是5 –
我想说非空子数的数量。 –