Jacob S. wrote: > newlist = [] > powers = [] > a = 'x**2+sin(x)+2*x' > a = a.split("+") > powers = [newlist.append(x) for x in a if x.count('**') >= 1] This is bizarre, to append to another list instead of just letting the list comprehension do its thing! It could be powers = [x for x in a if x.count('**') >= 1] or how about powers = [x for x in a if '**' in x] Kent