[Tutor] Splitting

Daniel Watkins daniel at thewatkins.org.uk
Mon Jul 10 06:29:19 CEST 2006


Abhinav Gaurav wrote:
>   Example :-
>   >>> a="43;dsds;d"
>>>> 
>>>> b=a.split(';')
    
>   Can anybody help on resolving this issue?

This is what it looks like on my computer:
        >>> a="43;dsds;d"
        >>> b=a.split(";")
        >>> print b
        ['43', 'dsds', 'd']

This is using Python 2.4.2, though AFAI can recall this behaviour hasn't
changed in a while... Weird...

Sorry I couldn't be more help,
Dan



More information about the Tutor mailing list