Errors while using strip and remove on a variable.

anand jeyahar anand.ibmgsi at gmail.com
Thu Feb 3 16:21:19 CET 2011


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')
print a

print c


==============================================
Anand Jeyahar
http://sites.google.com/a/cbcs.ac.in/students/anand
==============================================
The man who is really serious,
with the urge to find out what truth is,
has no style at all. He lives only in what is.
                  ~Bruce Lee

Love is a trade with lousy accounting policies.
                 ~Aang Jie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110203/42e26c19/attachment.html>


More information about the Python-list mailing list