I am still a bit of a beginner, and I can't figure out a good way to crack this nut.
I have a nested list of arbitrary depth. Something like :
sample = [[1, [2, '', [None, 5], [6]]], None]
I need to cycle through each level of the list and remove any entries that are empty strings or None. Aside from this, the nested list should be unchanged.
I suspect something like recursion, but I've never created a function that does that, nor can I find a good example online that fits my needs. My attempts have been utterly ineffective.
Any help would be appreciated, as I am at a bit of a loss how to even start.