Byron wrote:
Bob Gailer wrote:
  
read the file into a string variable (assuming the file is not humungus)
find the location of "something" in the string
assemble a new string consisting of:
   the original string up to the location (index) of "something"
   "what"
   the rest of the original string
write the new string to the file
    

Hi Scott,

Bob gave you the basic instructions that you need to complete the task 
that you are asking for.  If you don't know how to do this, I would 
suggest that you start with the following Python tutorial: 
http://www.greenteapress.com

They provide an excellent tutorial for learning the basics of Python -- 
and best of all, it's free and written for absolute beginners.

Take care,

Byron
---

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
  
Thanks again,

I figured it out with the index function of the file objects, I didn't know that you could search for a word and find the exact pos of it, that was the tiny bit of information I was looking for.


-Scott Oertel


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to