[EMAIL PROTECTED] wrote:
> Sure, you're right I forgot about rsplit !
> I guess the negative indexes & al could be done with
> 
> sep.join(xyz.split(sep)[:index])

For index=-1 use
xyz.rsplit(sep, 1)[0]

Kent
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to