Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31493

Index in a list

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <tolidtm@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.018
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'importing': 0.04; 'indexing': 0.07; 'index': 0.13; '"user': 0.16; 'matching.': 0.16; 'subject:Index': 0.16; 'trying': 0.21; 'message- id:@mail.gmail.com': 0.27; 'subject:list': 0.28; "i'm": 0.29; 'file': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'text': 0.34; 'thanks': 0.34; 'list': 0.35; 'received:209.85': 0.35; 'list.': 0.35; 'but': 0.36; 'received:209': 0.37; 'to:addr:python.org': 0.39; 'hello,': 0.39; 'header:Received:5': 0.40
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=bJLPEw+cVLxRdaZ58KVlwr9uP382JQlPMAa48kGqAdI=; b=IhvesJL1kk/HVAkzvurFQteq3szI6KVpUPHHpK1D7x1/AO+9GUoPkSw16UFkBXL/bG aAgpQ44jSOczwVAV1122zF0FtzU0TJdT4bBFsD9AkFalCNlLPM3usUXG0mxkyiVLPx6z 57hKKFyRRDCpV8Mg2X51Ws0TAomptaX81zDn+J1klMxoXQR/zvHLY6F8X0DcfKiRz5WR DfCQLNCbWv2kdOxTZcNAqUIc66xHYGlC6a2goaEH6UaTf8LKCfptIYWXAeAoe3HHlC6Q q3wBLQQkb0HVUL6eGfsjealarg9jPGSQCQbBqqD0DPjP+Dj5NojdjWgrXQjDSBbdP3tv 7tCA==
MIME-Version 1.0
Date Wed, 17 Oct 2012 12:10:56 +0200
Subject Index in a list
From Anatoli Hristov <tolidtm@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2338.1350468659.27098.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1350468659 news.xs4all.nl 6985 [2001:888:2000:d::a6]:37419
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:31493

Show key headers only | View raw


Hello,

I'm trying to index a text in a list as I'm importing a log file and
each line is a list.

What I'm trying to do is find the right line which contains the text
User : and take the username right after the text "User :", but the
list.index("(User :") is indexing only if all the text matching. How
can I have the right position of the line which contains the word
("(User :")

Thanks

Anatoli

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Index in a list Anatoli Hristov <tolidtm@gmail.com> - 2012-10-17 12:10 +0200
  Re: Index in a list Hans Mulder <hansmu@xs4all.nl> - 2012-10-17 18:46 +0200

csiph-web