split() off last substring

Greg Ewing greg at cosc.canterbury.ac.nz
Mon Apr 15 22:34:38 EDT 2002


bvdpoel at uniserve.com wrote:
> 
> I guess I want something like:
> 
>         b,c=a.rsplit(1)

It would be nice if you could do this with

  b, c = a.split(-1)

PEP, anyone?

-- 
Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:	  
http://www.cosc.canterbury.ac.nz/~greg



More information about the Python-list mailing list