I came up with the following function:
def func6a(lista):
maior = 0
for el in lista:
if type(el) == list:
maior = func6a(el)
else:
if len(el) > maior:
maior = el
return maior
But unfortunately, I'm having the following error:
* if len (el) > greater:
TypeError: '>' not supported between instances of 'int' and 'str' *
My question is; How can I escape this error? I expected it, but I do not know how to escape!
Note: Parameters must be strings or nested lists containing strings!