"Kirby Urner" <urner at alumni.princeton.edu> wrote in message ... > E.g. >>> additem(1,[1,2,[3,4,[5,6]],7]) > [2,3,[4,5,[6,7]],8] > def additem(x): if type(x) is type([]): return map(additem,x) else: return x+1