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


Groups > comp.lang.python > #31493

Index in a list

Date 2012-10-17 12:10 +0200
Subject Index in a list
From Anatoli Hristov <tolidtm@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2338.1350468659.27098.python-list@python.org> (permalink)

Show all headers | 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