> Example :- > >>> a="43;dsds;d" >>>> >>>> b=a.split(';') > > Here I encountered the following error :- > > Traceback (innermost last): > File "<stdin>", line 1, in ? > AttributeError: 'string' object has no attribute 'split' > > Can anybody help on resolving this issue?
>>> a="43;dsds;d" >>> b=a.split(';') >>> b ['43', 'dsds', 'd'] >>> Works for me in Python 2.4 Are you using an old version of Python? pre v2.0? If so you need to use the string module rather than string methods. Otherwise I don't know what might be wrong. Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor