Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed0.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.86.MISMATCH!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.107 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.79; '*S*': 0.00; 'jan': 0.12; 'received:143': 0.16; 'skip:` 30': 0.16; 'wrote:': 0.18; 'header :User-Agent:1': 0.23; 'subject:problem': 0.24; 'header:In-Reply- To:1': 0.27; 'forgot': 0.30; 'subject:with': 0.35; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'should': 0.36; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'content-disposition:inline': 0.62; 'more': 0.64; 'url:me': 0.69 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=5mgE/D11Z0XEZuODlmy8o+cqLTIeNbU6CarPW4MElgo=; b=BrX+pozXVNN6rIaDTgIGSqosQDLZkg36Pmi24a0NLDsWLAD2EmSZByNoIRdux+/OxO jRTjwTMvjAwGxKdQpGdVLSDoruj38qYl0AHYhA3Smc5A7ksW9+LX1yiUakm4leI7kfu9 2t+X0XQuSD1LhOEOiN/oKg//gbWz2vTMjR3eaDPBf5J6Z2q/tsFZzkiPXVUZRFWUpmEi v+CoUma7hANtmmOgC2WQWMFMlfWsAl5+uJm7cU0BZXZCtD3lW6HECQXQGBZURFlty+6k 9GErpKAqW3u0v5e+0NimL6JLedzN7stxI74w1T4I8SHdhLFVzWOfn20BW9Oa0Xiaszv/ JK7w== X-Gm-Message-State: ALoCoQmvePn+x4mgcppZDGEqsXrBXHiDQh6H2BQNcgpeUflLCBczy4hTjkrLey+1xeSNB6SYoB2z X-Received: by 10.68.109.162 with SMTP id ht2mr89815401pbb.169.1420469857869; Mon, 05 Jan 2015 06:57:37 -0800 (PST) Date: Mon, 5 Jan 2015 22:57:34 +0800 From: Shiyao Ma To: python-list@python.org Subject: Re: problem with for and if References: <20150105143802.GB45241@FuzzyHorror> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150105143802.GB45241@FuzzyHorror> User-Agent: All mail clients suck. This one just sucks way more. X-Info: Find me @introom on Freenode. Have beers! :) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 11 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1420469867 news.xs4all.nl 2901 [2001:888:2000:d::a6]:35206 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:83248 On Jan 05 at 22:38 +0800, Shiyao Ma wrote: > More preferably, you should repetitively use "str.find" > > Or just use `max(0,len(zmienna.split(szukana))-1)` Forgot there was a `str.count`, ;). -- Shiyao Ma http://introo.me