I'm playing with recursive functions and I'm not figure out why the function is not return if the list is empty ([]) even if the print function before the return is executed.
def go(mylist):
if not mylist:
print('Empty list')
return 'List Empty'
else:
print(mylist)
mylist.pop()
go(mylist)
print(go([1, 2, 3, 4, 5]))
I get return 'None' because a function without a a return always return 'None'