2 ms·
This is what "nonlocal" is for. That would make the original code work. And putting the value inside a list works because in that case you are mutating the lis
by recursive 12y ago
This is what "nonlocal" is for. That would make the original code work. And putting the value inside a list works because in that case you are mutating the list not assigning a new list to the variable.