On Thu, Feb 3, 2011 at 10:21 AM, anand jeyahar <anand.ibm...@gmail.com> wrote:
> Hi,
>     I am trying to strip a string and then remove on the resulting list to
> remove a set of characters. It works fine with the python shell.
>
> But after remove the list becomes None, when i am running it from within a
> script.
>
> I am guessing it has something to do with the way python handles assignment.
> please find the script below*
>
> a ='oe,eune,eueo, ,u'
> b = a.split(',')
> print b
> c = b.remove('oe')

The remove method of a list modifies the list in place and doesn't
return anything (Therefore, it returns None because every
function/method in Python has to return something). There's no need to
assign the result to a variable.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to