Re: remove characters before last occurance of "."

2011-11-28 Thread plsullivan1
Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: remove characters before last occurance of "."

2011-11-28 Thread Arnaud Delobelle
On 28 November 2011 20:45, Ethan Furman wrote: > plsulliv...@gmail.com wrote: >> >> s = GIS.GIS.Cadastral\GIS.GIS.Citylimit >> NeededValue = Citylimit > > NeededValue = s.rsplit('.', 1)[1] Also: >>> s[s.rfind(".") + 1:] 'Citylimit' >>> s.rpartition(".")[2] 'Citylimit' -- Arnaud -- http://mail

Re: remove characters before last occurance of "."

2011-11-28 Thread Ethan Furman
plsulliv...@gmail.com wrote: s = GIS.GIS.Cadastral\GIS.GIS.Citylimit NeededValue = Citylimit NeededValue = s.rsplit('.', 1)[1] ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

remove characters before last occurance of "."

2011-11-28 Thread plsullivan1
I need for GIS.GIS.Cadastral\GIS.GIS.Citylimit to be Citylimit. The "cadastral" and "citylimit" will be different as I readlines from a list. In other words, the above could be GIS.GIS.Restricted\GIS.GIS.Pipeline and I would need Pipeline. s = GIS.GIS.Cadastral\GIS.GIS.Citylimit NeededValue = C