spilt question

loial jldunn2000 at gmail.com
Thu May 16 11:00:25 EDT 2013


I want to split a string so that I always return everything BEFORE the LAST underscore

HELLO_xxxxxxxx.lst         # should return HELLO
HELLO_GOODBYE_xxxxxxxx.ls  # should return HELLO_GOODBYE

I have tried with rsplit but cannot get it to work.

Any help appreciated




More information about the Python-list mailing list