def flatten(aList):
if len(aList) == 1:
return aList
else:
return flatten(aList[:-1])]
I want it to return a flatten list of the original list, pass to the function. After passing it this a list, it only returns the first element.
List = [68, -99,"abc", -8,100, [-92, 89, 81, 96]]
flatten(List)