Index in a list

Anatoli Hristov tolidtm at gmail.com
Wed Oct 17 06:10:56 EDT 2012


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



More information about the Python-list mailing list