split() off last substring

bvdpoel at uniserve.com bvdpoel at uniserve.com
Sun Apr 14 22:58:19 EDT 2002


Can I tell split() to split off the LAST seqment? I guess I want
something like:

	a="aaa.bbb.ccc"
	b,c=a.rsplit(1)
	print b,c
	# "aaa.bbb", "ccc"

Thx.

-- 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: bvdpoel at uniserve.com
WWW:   http://users.uniserve.com/~bvdpoel




More information about the Python-list mailing list