Object of type 'NoneType' has no len ()

def get_length_of_missing_array (array_of_arrays):

if len(array_of_arrays)==0:
    return 0
else:
    lenlist = [len(i) for i in array_of_arrays ]
    print(lenlist)
    rangelist=[t for t in range(min(lenlist),max(lenlist)+1)]
    print(rangelist)
    missing=set(rangelist)-set(lenlist)
    return missing.pop()
   

will prompt: object of type "NoneType" has no len ()
the error line is: lenlist = [len (i) for i in array_of_arrays]
but I don"t quite understand why this sentence has this error. Please help me explain it. Thank you

.
Mar.07,2021
Menu