Not sure if you were challenging me to think, or asking me, but I was wanting to "line" to be printed... as in the string from the list. What I got with re was what I'm assuming was a memory address.

On 10/17/06, Danny Yoo <[EMAIL PROTECTED]> wrote:


> I remove those lines, but I was trying to use
> for line in contents:
>   result = re.search("something", line)
>   print result

'result' here is going to either be None, as you've seen, or a "match"
object.  We have several options available to use once we have a
match.  Take a look at a few of the methods in here:

     http://www.python.org/doc/lib/match-objects.html

Printing a match object itself won't be too informative.  What would you
like to show up if there is some match?

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to