Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'also:': 0.09; 'subject:characters': 0.09; 'subject:remove': 0.09; 'received:209.85.213.174': 0.16; 'received:mail- yx0-f174.google.com': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; '>>>': 0.18; 'cc:no real name:2**0': 0.20; 'header:In-Reply- To:1': 0.22; 'cc:2**0': 0.24; 'message-id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.29; 'received:google.com': 0.37; 'subject:last': 0.38; 'received:209.85': 0.38; 'received:209': 0.40; '2011': 0.61 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gexNmghxwU6eMRUPmbzj3op1uYhmRK0q0cYLXWFr9ag=; b=G4lEUmp+W0QPd9qZHZ2XgSip9ptO4T+gBHroIhcDQ8NUhNp7y2D11gK+S9dxj6dbOQ 6onLym4AepyaZRRVHAWs+3ONyoNetVnFK6l6kyci3gHMRBAM2ZX0KsQh6dgBNkIL4rs5 xuDbWiWxB/Arb5q23lvem5+7+cWODQufr8bHY= MIME-Version: 1.0 In-Reply-To: <4ED3F303.8020307@stoneleaf.us> References: <9707115.134.1322511872642.JavaMail.geo-discussion-forums@yqeu24> <4ED3F303.8020307@stoneleaf.us> Date: Mon, 28 Nov 2011 21:08:29 +0000 Subject: Re: remove characters before last occurance of "." From: Arnaud Delobelle To: Ethan Furman Content-Type: text/plain; charset=UTF-8 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1322514511 news.xs4all.nl 6962 [2001:888:2000:d::a6]:45144 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16355 On 28 November 2011 20:45, Ethan Furman wrote: > plsullivan1@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