"Ben Ganzfried" <ben.ganzfr...@gmail.com> wrote

1) Doesn't the read() file object method return the specified
characters from the file as a string?

Yes
2) If #1 is correct, then why is my variable "source" being viewed as
a list as opposed to a string?

You are not using read(), you are using readlines()
which returns all of the lines in a list.

3) How can I change my variable "source" so that it can use the 'find'
method?

Use read()

HTH,


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to