For the following recursive function, I don't know why the output is
[['c']]
[[['c']]]
if the input is a list:
['a',['b',['c']]]
I thought the output should be
[['c']]
[['b', ['c']]]
def rec(L):
if len(L)==1:
return
L.pop(0)
for elem in L:
rec(elem)
print L
return