I have the following code which I use to map a nested list in Python to produce a list with the same structure.
>>> nested_list = [[\'Hello\', \'Wo
Remember the Zen of Python:
There is generally more than one -- and probably several -- obvious ways to do it.**
** Note: Edited for accuracy.
Anyway, I prefer map.
from functools import partial nested_list = map( partial(map, str.upper), nested_list )