I have a list of lists. I want to remove the leading and trailing spaces from them. The strip() method returns a copy of the string without leading and trailing
strip()
c=[] for i in networks: d=[] for v in i: d.append(v.strip()) c.append(d)