I currently have a list called regkey and a string called line_to_delete, which I obviously want to delete from the list. At the moment I'm searching through one element of the list at a time creating substrings as line_to_delete only represents part of the line that I want to delete but is uniquely identifiable within the list.
Anyway what I really need to do is make this more efficient, use fewer resources and be quicker, so are there any ways to do this?