def f(L):
if L == []:
return 0
return (f(L[0]) if type (L[0]) == list else 1) + f(L[1:])
I'm having a bit of trouble determining big O for recursive functions. I have a feeling this function is O(n*m) where n is the length of the list L and m is the length of list elements in list L. Am I correct or is this function just O(n)?