i have list of lists, i need via Python iterate through each string ,remove spaces (strip) and save list into new list.
E.g. original list: org = [ [' a ','b '],['c ',' d '],['e ',' f'] ]
Expecting new list: new = [ ['a','b'],['c','d'],['e','f'] ]
I started with below code, but no idea how to add stripped objects into new list of lists. new.append(item) - create simple list without inner list.
new = []
for items in org:
for item in items:
item= item.strip()
new.append(item)