I have a file where I must find and delete a string, which in this case is called 'queue'. After I delete it, I must then delete all the following lines until a '[' character is found. I can't figure out how to do this, being a newbie in python as I am, and would appreciate any help.

There is a general rule in programming that states "if you don't know what your program is supposed to do then you shouldn't start writing it."

Start by writing the algorithm in English (pseudo-code). Then do a walk through of the pseudo-code to see if the algorithm is correct. After that you can start coding.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.