I have a big list of floats and integers as given below. I want to find the length of each sublist by neglecting empty or single elements.
big_list = [[137.83,81.80,198.56],0.0,[200.37,151.55,165.26, 211.84],
0.0,[1,2,3],4,[5,6,0,5,7,8],0,[2,1,4,5],[9,1,-2]]
My present code:
list_len = []
for i in big_list:
list_len.append(len(i))
Present output:
TypeError: object of type 'numpy.float64' has no len()
Expected output:
list_len = [3,4,3,6,4,3] # list_len should neglect elements like 0, 4 in big_list.